From c6bf21f2ab7a5a5395d6f02b05c882b86d25f981 Mon Sep 17 00:00:00 2001 From: lian Date: Tue, 11 Mar 2025 16:24:59 +0800 Subject: [PATCH] fix bug when get office feature (#7585) --- seahub/views/file.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/seahub/views/file.py b/seahub/views/file.py index 73e6d2f837..eaa5bd0c0e 100644 --- a/seahub/views/file.py +++ b/seahub/views/file.py @@ -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)