Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using find() and ordering by playlists.PlaylistVersionConnection.sg_sort_order returns CRUD ERROR #288

Open
blerrgh opened this issue May 30, 2023 · 1 comment

Comments

@blerrgh
Copy link

blerrgh commented May 30, 2023

The following code:

shotgun.find(
    "Version",
    order=[{"field_name": "playlists.PlaylistVersionConnection.sg_sort_order", "direction": "asc"}],
)

Results in the following error:

shotgun_api3.shotgun.Fault: API read() CRUD ERROR #10: Read failed for entity type [Version]

This is probably an issue on the server side rather than the python api client, but I would expect to be able to sort by the Playlists > Sort Order field though the API in the same way you can through the UI.

@blerrgh
Copy link
Author

blerrgh commented Jun 11, 2023

More specifically, this is an issue because when the UI is sorted by Playlist -> Sort Order and an Action Menu Item is triggered, the POST payload from Shotgrid includes sort_column: playlists.PlaylistVersionConnection.sg_sort_order

However, querying the API using that sort column triggers this ambiguous CRUD error.

I would expect any sort_column value that is provided by Action Menu Items or Webhooks to be valid a sort order field for an api find() query, but that doesn't always seem to be the case.

At the very least, it would be nice if the error message was more descriptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant