diff --git a/.gitignore b/.gitignore index c04d3d11f..af933b202 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ t version_info.json .coverage* UNKNOWN.egg-info/ -process_models/ \ No newline at end of file +process_models/ +.ipynb_checkpoints diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/data_migrations/version_1_3.py b/spiffworkflow-backend/src/spiffworkflow_backend/data_migrations/version_1_3.py index 32a9c4a36..e1168eba5 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/data_migrations/version_1_3.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/data_migrations/version_1_3.py @@ -1,6 +1,5 @@ import copy import json -import time import uuid from hashlib import sha256 @@ -219,9 +218,14 @@ class VersionOneThree: task_models = TaskModel.query.filter(TaskModel.properties_json.like('%last_state_change": null%')).all() # type: ignore for task_model in task_models: parent_task_model = task_model.parent_task_model() - last_state_change = time.time() + + # we really don't know what to set this to if there is no parent_task_model, + # so let spiff fix it for us by telling it it is out of date + last_state_change = 0 + if parent_task_model is not None: last_state_change = parent_task_model.properties_json["last_state_change"] + task_model.properties_json["last_state_change"] = last_state_change task_model.properties_json["task_spec"] = task_model.task_definition.bpmn_identifier flag_modified(task_model, "properties_json") # type: ignore