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

Commit 4220430

Browse files
account for empty list
1 parent 79341b5 commit 4220430

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

graphql_api/types/query/query.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ 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+
# if the owner tracks plan activated users, check if the user is in the list
5456
target_owner = await get_owner(service, username)
5557
has_plan_activated_users = (
56-
target_owner and target_owner.plan_activated_users is not None
58+
target_owner
59+
and target_owner.plan_activated_users is not None
60+
and len(target_owner.plan_activated_users) > 0
5761
)
5862
if (
5963
has_plan_activated_users

0 commit comments

Comments
 (0)