Skip to content

Commit 869812d

Browse files
authored
fix: application list (#3359)
1 parent 4001d0c commit 869812d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

apps/application/serializers/application.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,16 @@ def get_query_set(self, instance: Dict, workspace_manage: bool, is_x_pack_ee: bo
318318
application_custom_sql_query_set = application_query_set
319319
application_query_set = application_query_set.order_by("-update_time")
320320
workspace_user_role_mapping_model = DatabaseModelManage.get_model('workspace_user_role_mapping')
321-
return {
321+
322+
return {'folder_query_set': folder_query_set,
323+
'application_query_set': application_query_set,
324+
'user_query_set': QuerySet(
325+
workspace_user_role_mapping_model).filter(
326+
user_id=user_id, workspace_id=workspace_id)} if (not workspace_manage and is_x_pack_ee) else {
322327
'folder_query_set': folder_query_set,
323328
'application_query_set': application_query_set,
324329
'application_custom_sql': application_custom_sql_query_set
325-
} if (workspace_manage and not is_x_pack_ee) else {'folder_query_set': folder_query_set,
326-
'application_query_set': application_query_set,
327-
'user_query_set': QuerySet(
328-
workspace_user_role_mapping_model).filter(
329-
user_id=user_id, workspace_id=workspace_id)}
330+
}
330331

331332
@staticmethod
332333
def is_x_pack_ee():

0 commit comments

Comments
 (0)