Refactor: keep timestamp consistency (#12279)

### What problem does this PR solve?

keep timestamp consistency

### Type of change

- [x] Refactoring
This commit is contained in:
Stephen Hu
2025-12-29 12:02:43 +08:00
committed by GitHub
parent f9619defcc
commit 9883c572cd
2 changed files with 9 additions and 7 deletions

View File

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