Fix the consistency of ts and datetime (#12288)

### What problem does this PR solve?

#12279
#11942 

### Type of change

- [x] Refactoring

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2025-12-29 12:37:13 +08:00
committed by GitHub
parent 9883c572cd
commit 27c55f6514
4 changed files with 24 additions and 15 deletions

View File

@ -170,11 +170,11 @@ class PipelineOperationLogService(CommonService):
avatar=avatar,
)
timestamp = current_timestamp()
datetime_now = datetime.now()
datetime_now = datetime_format(datetime.now())
log["create_time"] = timestamp
log["create_date"] = datetime_format(datetime_now)
log["create_date"] = datetime_now
log["update_time"] = timestamp
log["update_date"] = datetime_format(datetime_now)
log["update_date"] = datetime_now
with DB.atomic():
obj = cls.save(**log)