Never set the date to datetime.utcnow() on DateTime fields. We want this to fall back on the func.now() method and allow the database to set the time on insert.

This commit is contained in:
Dan 2021-07-12 15:58:32 -04:00
parent 1f0b881b92
commit dd67a5e650
1 changed files with 1 additions and 1 deletions

View File

@ -810,7 +810,7 @@ class WorkflowService(object):
mi_count=task.multi_instance_count, # This is the number of times the task could repeat.
mi_index=task.multi_instance_index, # And the index of the currently repeating task.
process_name=task.process_name,
date=datetime.utcnow(),
# date=datetime.utcnow(), <=== For future reference, NEVER do this. Let the database set the time.
)
db.session.add(task_event)
db.session.commit()