Do not send dummy status if not found

This commit is contained in:
Petr Kalis 2025-10-24 16:00:42 +02:00
parent 542acd0896
commit fcebdaf130

View file

@ -1284,10 +1284,12 @@ class ProjectPushItemProcess:
if context_value and isinstance(context_value, dict):
for context_sub_key in context_value.keys():
value_to_update = formatting_data.get(context_key, {}).get(
context_sub_key)
context_sub_key
)
if value_to_update:
repre_context[context_key][
context_sub_key] = value_to_update
repre_context[context_key][context_sub_key] = (
value_to_update
)
else:
value_to_update = formatting_data.get(context_key)
if value_to_update:
@ -1313,17 +1315,10 @@ class ProjectPushItemProcess:
status["name"]: status
for status in self._project_entity["statuses"]
}
source_status = src_version_entity["status"]
copied_status = dst_project_statuses.get(source_status)
if not copied_status:
self._log_warning(
f"'{source_status}' not found in destination project. "
"Used first configured status from there."
)
copied_status = dst_project_statuses[
next(iter(dst_project_statuses))
]
return copied_status["name"]
copied_status = dst_project_statuses.get(src_version_entity["status"])
if copied_status:
return copied_status["name"]
return None
class IntegrateModel: