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
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
def copy_under(self, destination_parent, name=None): return utils.copy_files(self, destination_parent.node, destination_parent, name=name)