Guénaël Muller 6 lat temu
rodzic
commit
8a1672bcc5
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      tracim/tracim/lib/content.py

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

@@ -884,6 +884,7 @@ class ContentApi(object):
884 884
             label = item.label
885 885
 
886 886
         with DBSession.no_autoflush:
887
+
887 888
             file = self.create(
888 889
                 content_type=item.type,
889 890
                 workspace=workspace,
@@ -899,6 +900,12 @@ class ContentApi(object):
899 900
                     item.file_mimetype,
900 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 909
         if do_save:
903 910
             self.save(file, ActionDescription.CREATION, do_notify=do_notify)
904 911