Guénaël Muller 6 years ago
parent
commit
8a1672bcc5
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tracim/tracim/lib/content.py

+ 7 - 0
tracim/tracim/lib/content.py View File

884
             label = item.label
884
             label = item.label
885
 
885
 
886
         with DBSession.no_autoflush:
886
         with DBSession.no_autoflush:
887
+
887
             file = self.create(
888
             file = self.create(
888
                 content_type=item.type,
889
                 content_type=item.type,
889
                 workspace=workspace,
890
                 workspace=workspace,
899
                     item.file_mimetype,
900
                     item.file_mimetype,
900
                     item.depot_file.file
901
                     item.depot_file.file
901
                 )
902
                 )
903
+            for child in item.get_comments():
904
+                self.copy(child,
905
+                          new_parent=file,
906
+                          do_notify=False,
907
+                          do_save=False,
908
+                )
902
         if do_save:
909
         if do_save:
903
             self.save(file, ActionDescription.CREATION, do_notify=do_notify)
910
             self.save(file, ActionDescription.CREATION, do_notify=do_notify)
904
 
911