do not attempt to migrate instance from interstitial page if the serializer version has not been set yet

This commit is contained in:
jasquat 2023-11-09 09:13:18 -05:00
parent 7b904387fc
commit a48bc8a885
1 changed files with 4 additions and 1 deletions

View File

@ -673,7 +673,10 @@ def _dequeued_interstitial_stream(
yield from _interstitial_stream(process_instance, execute_tasks=False, is_locked=True) yield from _interstitial_stream(process_instance, execute_tasks=False, is_locked=True)
else: else:
# attempt to run the migrator even for a readonly operation if the process instance is not newest # attempt to run the migrator even for a readonly operation if the process instance is not newest
if process_instance.spiff_serializer_version < ProcessInstanceMigrator.CURRENT_VERSION: if (
process_instance.spiff_serializer_version is not None
and process_instance.spiff_serializer_version < ProcessInstanceMigrator.CURRENT_VERSION
):
try: try:
with ProcessInstanceQueueService.dequeued(process_instance): with ProcessInstanceQueueService.dequeued(process_instance):
ProcessInstanceMigrator.run(process_instance) ProcessInstanceMigrator.run(process_instance)