浏览代码

fixes the new treeview content root call

root 11 年前
父节点
当前提交
6cca21edb7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tracim/tracim/controllers/workspace.py

+ 2 - 2
tracim/tracim/controllers/workspace.py 查看文件

89
         workspace, content = convert_id_into_instances(current_id)
89
         workspace, content = convert_id_into_instances(current_id)
90
 
90
 
91
         # The following step allow to select the parent folder when content itself is not visible in the treeview
91
         # The following step allow to select the parent folder when content itself is not visible in the treeview
92
-        if content.type!=ContentType.Folder and CFG.CST.TREEVIEW_ALL!=CFG.get_instance().WEBSITE_TREEVIEW_CONTENT:
92
+        if content and content.type!=ContentType.Folder and CFG.CST.TREEVIEW_ALL!=CFG.get_instance().WEBSITE_TREEVIEW_CONTENT:
93
             content = content.parent if content.parent else None
93
             content = content.parent if content.parent else None
94
 
94
 
95
         # This is the init of the recursive-like build of the tree
95
         # This is the init of the recursive-like build of the tree
201
     def _get_treeviewable_content_types_or_none(self):
201
     def _get_treeviewable_content_types_or_none(self):
202
         if CFG.get_instance().WEBSITE_TREEVIEW_CONTENT==CFG.CST.TREEVIEW_ALL:
202
         if CFG.get_instance().WEBSITE_TREEVIEW_CONTENT==CFG.CST.TREEVIEW_ALL:
203
             return ContentType.Any
203
             return ContentType.Any
204
-        return None # None means "workspaces and folders"
204
+        return None # None means "workspaces and folders"