Skip to content

Commit

Permalink
fix: get project list using graphql as a normal user
Browse files Browse the repository at this point in the history
  • Loading branch information
martastain committed Oct 27, 2023
1 parent 21a9e05 commit fb5b6d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ayon_server/graphql/resolvers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from strawberry.types import Info

from ayon_server.access.utils import folder_access_list
from ayon_server.exceptions import ForbiddenException
from ayon_server.graphql.types import PageInfo
from ayon_server.lib.postgres import Postgres

Expand Down Expand Up @@ -185,7 +186,10 @@ async def resolve(
if project_name:
node = node_type.from_record(project_name, record, context=context)
else:
node = node_type.from_record(record, context=context)
try:
node = node_type.from_record(record, context=context)
except ForbiddenException:
continue
cursor = record["cursor"]
edges.append(edge_type(node=node, cursor=cursor))

Expand Down

0 comments on commit fb5b6d6

Please sign in to comment.