Browse Source

#185 Button don't appears anymore on already read workspaces

Alexis CLEMENT 8 years ago
parent
commit
f237bdaaf6
1 changed files with 5 additions and 3 deletions
  1. 5 3
      tracim/tracim/controllers/workspace.py

+ 5 - 3
tracim/tracim/controllers/workspace.py View File

@@ -69,14 +69,16 @@ class UserWorkspaceRestController(TIMRestController):
69 69
         show_archived = str_as_bool(kwargs.get('show_archived', ''))
70 70
         user = tmpl_context.current_user
71 71
 
72
+        workspace_api = WorkspaceApi(user)
73
+        workspace = workspace_api.get_one(workspace_id)
74
+
72 75
         unread_contents = ContentApi(user).get_last_unread(None,
73 76
                                                            ContentType.Any,
74
-                                                           None)
77
+                                                           workspace=workspace)
75 78
         current_user_content = Context(CTX.CURRENT_USER).toDict(user)
76 79
         current_user_content.roles.sort(key=lambda role: role.workspace.name)
77 80
 
78
-        workspace_api = WorkspaceApi(user)
79
-        workspace = workspace_api.get_one(workspace_id)
81
+
80 82
 
81 83
         dictified_current_user = Context(CTX.CURRENT_USER).toDict(user)
82 84
         dictified_folders = self.folders.get_all_fake(workspace).result