Skip to content

Commit c857173

Browse files
committed
Add check for upperSchemaVersionNew
1 parent 551ac1a commit c857173

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

azure/durable_functions/models/DurableOrchestrationContext.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def __init__(self,
7979
self._function_context: FunctionContext = FunctionContext(**kwargs)
8080
self._sequence_number = 0
8181
self._replay_schema = ReplaySchema(upperSchemaVersion)
82-
if upperSchemaVersionNew is not None and upperSchemaVersionNew > self._replay_schema.value:
82+
if (upperSchemaVersionNew is not None
83+
and upperSchemaVersionNew > self._replay_schema.value
84+
and upperSchemaVersionNew in ReplaySchema._value2member_map_):
8385
self._replay_schema = ReplaySchema(upperSchemaVersionNew)
8486

8587
self._action_payload_v1: List[List[Action]] = []

0 commit comments

Comments
 (0)