Skip to content

Commit

Permalink
appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Jan 9, 2025
1 parent 1b03cc3 commit 79341b5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions graphql_api/types/query/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ async def resolve_owner(
if not user or not user.is_authenticated:
raise UnauthorizedGuestAccess()
target_owner = await get_owner(service, username)
has_plan_activated_users = target_owner and target_owner.plan_activated_users is not None
if has_plan_activated_users and user.ownerid not in target_owner.plan_activated_users:
has_plan_activated_users = (
target_owner and target_owner.plan_activated_users is not None
)
if (
has_plan_activated_users
and user.ownerid not in target_owner.plan_activated_users
):
raise UnauthorizedGuestAccess()

return await get_owner(service, username)
Expand Down

0 comments on commit 79341b5

Please sign in to comment.