1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 03:18:23 +00:00

Fix multiple user options bug, handle the case repo is None when delete

This commit is contained in:
zhengxie
2015-12-04 11:15:34 +08:00
parent 4a5f27052a
commit f3732d87b6
2 changed files with 16 additions and 8 deletions

View File

@@ -1908,7 +1908,10 @@ def sys_repo_delete(request, repo_id):
return HttpResponseRedirect(next)
repo = seafile_api.get_repo(repo_id)
repo_name = repo.name
if repo: # Handle the case that repo is `None`.
repo_name = repo.name
else:
repo_name = ''
if MULTI_TENANCY:
org_id = seafserv_threaded_rpc.get_org_id_by_repo_id(repo_id)