Skip to content

Commit

Permalink
Not cast uuid to str to check nodegroup permission, #11126
Browse files Browse the repository at this point in the history
  • Loading branch information
njkim committed Jul 22, 2024
1 parent abd8654 commit 637cc9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arches/app/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ def get(self, request, tileid):
permitted_nodegroups = get_nodegroups_by_perm(
request.user, "models.read_nodegroup"
)
if str(tile.nodegroup_id) in permitted_nodegroups:
if tile.nodegroup_id in permitted_nodegroups:
return JSONResponse(tile, status=200)
else:
return JSONResponse(_("Tile not found."), status=404)
Expand Down Expand Up @@ -1801,7 +1801,7 @@ def graphLookup(graphid):

# filter nodes from attribute query based on user permissions
permitted_nodes = [
node for node in nodes if str(node["nodegroup_id"]) in permitted_nodegroups
node for node in nodes if node["nodegroup_id"] in permitted_nodegroups
]
for node in permitted_nodes:
try:
Expand Down

0 comments on commit 637cc9b

Please sign in to comment.