Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit ec18bbd

Browse files
fix: Fix deactivated enterprise user when no plan activated users
1 parent 8660eab commit ec18bbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphql_api/types/query/query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ async def resolve_owner(
5151
if settings.IS_ENTERPRISE and settings.GUEST_ACCESS is False:
5252
if not user or not user.is_authenticated:
5353
raise UnauthorizedGuestAccess()
54-
55-
target = await get_owner(service, username)
56-
if user.ownerid not in target.plan_activated_users:
54+
target_owner = await get_owner(service, username)
55+
has_plan_activated_users = target_owner and target_owner.plan_activated_users is not None
56+
if has_plan_activated_users and user.ownerid not in target_owner.plan_activated_users:
5757
raise UnauthorizedGuestAccess()
5858

5959
return await get_owner(service, username)

0 commit comments

Comments
 (0)