1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-28 03:10:45 +00:00

fix bug when get office feature (#7589)

This commit is contained in:
lian 2025-03-11 18:07:59 +08:00 committed by GitHub
parent 634646bb36
commit 578ede3e87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,7 +171,10 @@ def get_office_feature_by_repo(repo):
repo_feature = _check_feature(repo.repo_id)
if not repo_feature and '@seafile_group' not in repo_owner:
user = User.objects.get(email=repo_owner)
try:
user = User.objects.get(email=repo_owner)
except User.DoesNotExist:
return ENABLE_ONLYOFFICE, ENABLE_OFFICE_WEB_APP
role = get_user_role(user)
repo_feature = ROLES_DEFAULT_OFFCICE_SUITE.get(role)