Browse Source

bug fix: label generation only for folder

Bastien Sevajol (Algoo) 8 years ago
parent
commit
cd8c0aa13a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tracim/tracim/lib/content.py

+ 1 - 1
tracim/tracim/lib/content.py View File

337
     def create(self, content_type: str, workspace: Workspace, parent: Content=None, label:str ='', do_save=False, is_temporary: bool=False) -> Content:
337
     def create(self, content_type: str, workspace: Workspace, parent: Content=None, label:str ='', do_save=False, is_temporary: bool=False) -> Content:
338
         assert content_type in ContentType.allowed_types()
338
         assert content_type in ContentType.allowed_types()
339
 
339
 
340
-        if not label:
340
+        if content_type == ContentType.Folder and not label:
341
             label = self.generate_folder_label(workspace, parent)
341
             label = self.generate_folder_label(workspace, parent)
342
 
342
 
343
         content = Content()
343
         content = Content()