Fixes an issue where look assigner would not list anything if it had to list entries that had invalid ids (those that are NOT valid uuid patterns) and hence the ayon_api.get_folders query would fail.
Additional info
Ignore invalid entity ids in get_folders query to avoid GraphQlQueryFailed exception which then also fails to return for the valid ids in the set.
Fixes #84
Note that due to other logic in the code a warning will still be logged for these invalid ids, which is as intended. For example:
// Warning: ayon_maya.tools.mayalookassigner.commands : Id found on 2 nodes for which no folder is found database, skipping 'ac991b60b4c5a70'
// Warning: ayon_maya.tools.mayalookassigner.commands : Id found on 2 nodes for which no folder is found database, skipping 'ac991b60b1eeb7fc773031a70'
Testing notes:
Load some assets
Go to the cbId attribute. Remove some characters from before the : in the value.
Try the look assigner on that node - it doesn't list anything. (should log a warning instead!)
Now try that node together with nodes that do have valid ids - it still lists nothing. (should list instead, plus log warning)
OR
Load a scene with OpenPype assets together with a scene with AYON asset. Look assigner should still list entries for AYON.
Changelog Description
Fixes an issue where look assigner would not list anything if it had to list entries that had invalid ids (those that are NOT valid
uuid
patterns) and hence theayon_api.get_folders
query would fail.Additional info
Ignore invalid entity ids in
get_folders
query to avoidGraphQlQueryFailed
exception which then also fails to return for the valid ids in the set.Fixes #84
Note that due to other logic in the code a warning will still be logged for these invalid ids, which is as intended. For example:
Testing notes:
cbId
attribute. Remove some characters from before the:
in the value.OR
Load a scene with OpenPype assets together with a scene with AYON asset. Look assigner should still list entries for AYON.