Parcourir la source

bug fix: label generation only for folder

Bastien Sevajol (Algoo) il y a 7 ans
Parent
révision
cd8c0aa13a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      tracim/tracim/lib/content.py

+ 1 - 1
tracim/tracim/lib/content.py Voir le fichier

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