diff --git a/apps/applications/api/mixin.py b/apps/applications/api/mixin.py index ff939bf0b..59bc51467 100644 --- a/apps/applications/api/mixin.py +++ b/apps/applications/api/mixin.py @@ -32,6 +32,8 @@ class SerializeApplicationToTreeNodeMixin: return node def serialize_applications_with_org(self, applications): + if not applications: + return [] root_node = self.create_root_node() tree_nodes = [root_node] organizations = self.filter_organizations(applications)