File tree Expand file tree Collapse file tree
ayon_server/operations/project_level Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ async def update_project_level_entity(
106106 assert operation .data is not None , "data is required for update"
107107 assert operation .entity_id is not None , "entity_id is required for update"
108108
109+ # We use slightly different ACL logic if only the thumbnail_id is being updated.
110+ thumbnail_only = len (operation .data ) == 1 and (
111+ "thumbnailId" in operation .data or "thumbnail_id" in operation .data
112+ )
109113 entity = await entity_class .load (project_name , operation .entity_id )
110114
111115 hooks = OperationHooks .hooks ()
@@ -128,10 +132,6 @@ async def update_project_level_entity(
128132
129133 update_payload_dict = payload .dict (exclude_unset = True , by_alias = False )
130134
131- # We use slightly different ACL logic if only the thumbnail_id is being updated.
132-
133- thumbnail_only = len (operation .data ) == 1 and "thumbnail_id" in update_payload_dict
134-
135135 if user :
136136 await entity .ensure_update_access (user , thumbnail_only = thumbnail_only )
137137
You can’t perform that action at this time.
0 commit comments