Skip to content

Commit

Permalink
fix clear_invalid_repo_data (#5405)
Browse files Browse the repository at this point in the history
  • Loading branch information
likesclever authored Mar 17, 2023
1 parent 3b869ce commit 9dd0db2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seahub/base/management/commands/clear_invalid_repo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ class Command(BaseCommand):

def handle(self, *args, **kwargs):
self.stdout.write('Start to get all existing repo')
self.all_repo= [repo.repo_id for repo in seafile_api.get_repo_list(-1, -1)]
self.all_repo = [repo.repo_id for repo in seafile_api.get_repo_list(-1, -1, ret_virt_repo=True)]
trash_repo = [repo.repo_id for repo in seafile_api.get_trash_repo_list(-1, -1)]
self.all_repo.extend(trash_repo)
self.stdout.write('Successly get all existing repos')

#on_delete is CASCADE, so FileTag/FileComment will be deleted
# on_delete is CASCADE, so FileTag/FileComment will be deleted
self.tables = {'FileUUIDMap': FileUUIDMap, 'RevisionTags': RevisionTags,
'UserStarredFiles': UserStarredFiles,
'ExtraGroupsSharePermission': ExtraGroupsSharePermission,
Expand Down

0 comments on commit 9dd0db2

Please sign in to comment.