Browse Source

code quality

Bastien Sevajol 6 years ago
parent
commit
58aa6bebfd
No account linked to committer's email
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tracim/views/core_api/workspace_controller.py

+ 3 - 1
tracim/views/core_api/workspace_controller.py View File

70
             session=request.dbsession,
70
             session=request.dbsession,
71
             config=app_config,
71
             config=app_config,
72
         )
72
         )
73
+        
74
+        roles = rapi.get_all_for_workspace(request.current_workspace)
73
         return [
75
         return [
74
             rapi.get_user_role_workspace_with_context(user_role)
76
             rapi.get_user_role_workspace_with_context(user_role)
75
-            for user_role in rapi.get_all_for_workspace(request.current_workspace)
77
+            for user_role in roles
76
         ]
78
         ]
77
 
79
 
78
     def bind(self, configurator: Configurator) -> None:
80
     def bind(self, configurator: Configurator) -> None: