Fix old projects by pushing epic description to specification

This commit is contained in:
mijauexe
2025-07-23 16:20:01 +02:00
parent 2842f7d1d7
commit e8efadb552

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)
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(
"",
["E1 / T1", "Writing Specification", "working" if fe_states == [] else "done"],