Przeglądaj źródła

bug fix: label generation only for folder

Bastien Sevajol (Algoo) 8 lat temu
rodzic
commit
cd8c0aa13a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      tracim/tracim/lib/content.py

+ 1 - 1
tracim/tracim/lib/content.py Wyświetl plik

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()