From a4c57a605bf845a55b5d6024f985dbee218f120c Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 15 Sep 2016 14:18:00 +0200 Subject: [PATCH] Fixing epic serialization --- taiga/projects/history/freeze_impl.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/taiga/projects/history/freeze_impl.py b/taiga/projects/history/freeze_impl.py index 6804c249..fd452257 100644 --- a/taiga/projects/history/freeze_impl.py +++ b/taiga/projects/history/freeze_impl.py @@ -190,18 +190,6 @@ def _generic_extract(obj:object, fields:list, default=None) -> dict: return result -@as_tuple -def extract_user_stories(obj) -> list: - for user_story in obj.user_stories.all(): - - yield {"id": user_story.id, - "ref": user_story.ref, - "subject": user_story.subject, - "project": { - "id": user_story.project.id, - "name": user_story.project.name, - "slug": user_story.project.slug}} - @as_tuple def extract_attachments(obj) -> list: for attach in obj.attachments.all(): @@ -313,8 +301,7 @@ def epic_freezer(epic) -> dict: "is_blocked": epic.is_blocked, "blocked_note": epic.blocked_note, "blocked_note_html": mdrender(epic.project, epic.blocked_note), - "custom_attributes": extract_epic_custom_attributes(epic), - "user_stories": extract_user_stories(epic), + "custom_attributes": extract_epic_custom_attributes(epic) } return snapshot @@ -326,7 +313,7 @@ def epic_related_userstory_freezer(related_us) -> dict: "epic": related_us.epic.id, "order": related_us.order } - + return snapshot