From af857fee229fc89824e45a5d36ab0178e284ed44 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 19 Jul 2023 11:43:27 -0400 Subject: [PATCH] Revert "using new spiff api to get info about events. w/ elizabeth" This reverts commit 440a4850f1da32c20c0ae9714157a2880ddc99cf. --- .../services/process_instance_service.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py index 27efee96..85527101 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py @@ -144,7 +144,6 @@ class ProcessInstanceService: db.session.add(cycle) db.session.commit() - # TODO: test me @classmethod def waiting_event_can_be_skipped(cls, waiting_event: dict[str, Any], now_in_utc: datetime) -> bool: # @@ -153,9 +152,9 @@ class ProcessInstanceService: # # example: {'event_type': 'Duration Timer', 'name': None, 'value': '2023-04-27T20:15:10.626656+00:00'} # - spiff_event_type = waiting_event.event_type + spiff_event_type = waiting_event.get("event_type") if spiff_event_type == "DurationTimerEventDefinition": - event_value = waiting_event.value + event_value = waiting_event.get("value") if event_value is not None: event_datetime = TimerEventDefinition.get_datetime(event_value) return event_datetime > now_in_utc # type: ignore