Merge pull request #264 from Pythagora-io/bugfix/non-existing-desc-for-specification-old-project-fix

Fix old projects by pushing epic description to specification
This commit is contained in:
zvone187
2025-07-23 16:23:27 +02:00
committed by GitHub

View File

@@ -212,7 +212,13 @@ async def run_pythagora_session(sm: StateManager, ui: UIBase, args: Namespace):
fe_states = await sm.get_fe_states(limit=10) fe_states = await sm.get_fe_states(limit=10)
be_back_logs, last_task_in_db = await sm.get_be_back_logs() be_back_logs, last_task_in_db = await sm.get_be_back_logs()
if sm.current_state.specification and sm.current_state.specification.original_description: if sm.current_state.specification:
if not sm.current_state.specification.original_description:
spec = sm.current_state.specification
spec.description = project_state.epics[0]["description"]
spec.original_description = project_state.epics[0]["description"]
await sm.update_specification(spec)
await ui.send_front_logs_headers( await ui.send_front_logs_headers(
"", "",
["E1 / T1", "Writing Specification", "working" if fe_states == [] else "done"], ["E1 / T1", "Writing Specification", "working" if fe_states == [] else "done"],