fix error message on dup message start event

This commit is contained in:
burnettk 2024-02-21 13:48:05 -05:00
parent dfa3f9e879
commit 802d80883c
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -325,9 +325,10 @@ class SpecFileService(FileSystemService):
) )
db.session.add(message_triggerable_process_model) db.session.add(message_triggerable_process_model)
else: else:
if message_triggerable_process_model.process_model_identifier != ref.relative_location: existing_model_identifier = message_triggerable_process_model.process_model_identifier
if existing_model_identifier != ref.relative_location:
raise ProcessModelFileInvalidError( raise ProcessModelFileInvalidError(
f"Message model is already used to start process model {ref.relative_location}" f"Message model is already used to start process model {existing_model_identifier}"
) )
elif message_triggerable_process_model.file_name is None: elif message_triggerable_process_model.file_name is None:
message_triggerable_process_model.file_name = ref.file_name message_triggerable_process_model.file_name = ref.file_name