Пример #1
0
    def after_fork(self, node, fork, user, save=True):
        clone = self.clone()
        clone.owner = fork
        clone.save()
        if not self.root_node:
            self.on_add()

        clone.root_node = files_utils.copy_files(self.get_root(), clone.owner)
        clone.save()

        return clone, None
Пример #2
0
    def after_fork(self, node, fork, user, save=True):
        clone = self.clone()
        clone.owner = fork
        clone.save()
        if not self.root_node:
            self.on_add()

        clone.root_node = files_utils.copy_files(self.get_root(), clone.owner)
        clone.save()

        return clone, None
Пример #3
0
    def after_fork(self, node, fork, user, save=True):
        clone = self.clone()
        clone.owner = fork
        user_settings = user.get_addon('osfstorage')
        clone.user_settings = user_settings
        clone.region_id = user_settings.default_region_id

        clone.save()
        if not self.root_node:
            self.on_add()

        clone.root_node = files_utils.copy_files(self.get_root(), clone.owner)
        clone.save()

        return clone, None
Пример #4
0
    def after_fork(self, node, fork, user, save=True):
        clone = self.clone()
        clone.owner = fork
        user_settings = user.get_addon('osfstorage')
        clone.user_settings = user_settings
        clone.region_id = user_settings.default_region_id

        clone.save()
        if not self.root_node:
            self.on_add()

        clone.root_node = files_utils.copy_files(self.get_root(), clone.owner)
        clone.save()

        return clone, None
Пример #5
0
 def copy_under(self, destination_parent, name=None):
     return utils.copy_files(self,
                             destination_parent.node,
                             destination_parent,
                             name=name)
Пример #6
0
 def copy_under(self, destination_parent, name=None):
     return utils.copy_files(self, destination_parent.node, destination_parent, name=name)