1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-05-10 17:05:06 +00:00

fix bug when get office feature ()

This commit is contained in:
lian 2025-03-11 16:24:59 +08:00 committed by GitHub
parent 1ae78af9fc
commit c6bf21f2ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,7 +174,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)