diff --git a/taiga/projects/userstories/services.py b/taiga/projects/userstories/services.py index 5998a57e..71377b52 100644 --- a/taiga/projects/userstories/services.py +++ b/taiga/projects/userstories/services.py @@ -517,7 +517,7 @@ def _get_userstories_epics(project, queryset): result = sorted(result, key=itemgetter("order")) # Add row when there is no user stories with no epics - if result[0]["id"] is not None: + if result == [] or result[0]["id"] is not None: result.insert(0, { "id": None, "ref": None,