コード例 #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
ファイル: models.py プロジェクト: mfraezz/osf.io
    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
ファイル: base.py プロジェクト: ubiquitypress/osf.io
 def copy_under(self, destination_parent, name=None):
     return utils.copy_files(self,
                             destination_parent.node,
                             destination_parent,
                             name=name)
コード例 #6
0
ファイル: base.py プロジェクト: 545zhou/osf.io
 def copy_under(self, destination_parent, name=None):
     return utils.copy_files(self, destination_parent.node, destination_parent, name=name)