Add episode filtering and an edits endpoint to schedule items#1159
Merged
Conversation
Add an optional episode_id query parameter to restrict results to the sequences of a given episode. [schedule] Add episode_id filter on sequences schedule items Add an optional episode_id query parameter to restrict results to the sequences of a given episode.
Add an optional episode_id query parameter to the asset-types schedule-items endpoint, restricting results to the asset types having assets natively belonging to the given episode (shared/casted assets excluded, to match the schedule scope). A new assets_service.get_asset_types_for_episode helper backs the filter.
Add an optional episode_id query parameter to the episodes schedule-items endpoint, restricting results to the given episode.
Commit ddc4fe9 added an is_valid_id guard to get_full_shot, but services are called internally with uuid.UUID objects while _UUID_RE.match only accepts strings, so test_get_full_shot failed with TypeError. Cast the value to str before matching: UUID objects are valid again and non-string garbage returns False instead of raising.
Add GET /data/projects/<project_id>/schedule-items/<task_type_id>/edits (one schedule item per edit, with an optional episode_id filter through the edit parent) so the production schedule can drill down Edit task types the same way as sequences and episodes. Unlike sequences and episodes, edits are soft-deleted when they still have tasks, so canceled edits are excluded from the schedule; on hard deletion, remove_edit now clears the edit schedule items the same way sequence and episode removal do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
is_valid_idrejects theuuid.UUIDobjects passed toget_full_shot, raising aTypeError.Solution
episode_idquery parameter to the three endpoints, restricting results to the sequences / asset types / episode belonging to the given episode; the filter is project-scoped, so anepisode_idfrom another project returns nothing.episode_idfilter; deleted edits no longer appear in the schedule, and their schedule items are cleaned up.strinis_valid_id, so UUID objects are accepted again.