Kaynağa Gözat

Cleans up following PEP8 rules

Adrien Panay 7 yıl önce
ebeveyn
işleme
3f99483cfc
1 değiştirilmiş dosya ile 11 ekleme ve 7 silme
  1. 11 7
      tracim/tracim/controllers/admin/workspace.py

+ 11 - 7
tracim/tracim/controllers/admin/workspace.py Dosyayı Görüntüle

@@ -157,17 +157,21 @@ class WorkspaceRestController(TIMRestController, BaseController):
157 157
 
158 158
     @tg.expose('tracim.templates.admin.workspace_getall')
159 159
     def get_all(self, *args, **kw):
160
-
161 160
         user = tmpl_context.current_user
162 161
         workspace_api_controller = WorkspaceApi(user)
163
-
164 162
         workspaces = workspace_api_controller.get_all_manageable_for_user(user)
165
-
166 163
         current_user_content = Context(CTX.CURRENT_USER).toDict(user)
167
-        fake_api = Context(CTX.ADMIN_WORKSPACE).toDict({'current_user': current_user_content})
168
-
169
-        dictified_workspaces = Context(CTX.ADMIN_WORKSPACES).toDict(workspaces, 'workspaces', 'workspace_nb')
170
-        return DictLikeClass(result = dictified_workspaces, fake_api=fake_api)
164
+        fake_api = Context(CTX.ADMIN_WORKSPACE) \
165
+            .toDict(
166
+                {'current_user': current_user_content}
167
+            )
168
+        dictified_workspaces = Context(CTX.ADMIN_WORKSPACES) \
169
+            .toDict(
170
+                workspaces,
171
+                'workspaces',
172
+                'workspace_nb',
173
+            )
174
+        return DictLikeClass(result=dictified_workspaces, fake_api=fake_api)
171 175
 
172 176
     @tg.expose('tracim.templates.admin.workspace_getone')
173 177
     def get_one(self, workspace_id):