Skip to content

Skip invalid entities in the batch delete instead of failing#1147

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:fix-delete-entities-skip-invalid
Jul 10, 2026
Merged

Skip invalid entities in the batch delete instead of failing#1147
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:fix-delete-entities-skip-invalid

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problem

  • deletion_service.remove_entities (batch delete-entities route, merged in Add batch action routes for multi-selection Kitsu operations #1145) raised a WrongParameterException as soon as one id did not belong to the project or was not a deletable type, aborting the whole batch.
  • A selection containing a single stray entity (wrong project, or a sequence) therefore deleted nothing.

Solution

  • Skip entities that do not belong to the project or are not an asset, shot, edit or concept, and return the ids actually removed.
  • Update the tests accordingly (skip unsupported type, skip entity from another project) and drop the now-unused exception and the 400 response from the route doc.

Follow-up to #1145 (merged before this change landed).

remove_entities raised a WrongParameterException as soon as one id did
not belong to the project or was not a deletable type, aborting the
whole batch. Skip those entities instead and return the ids actually
removed, so a selection with a stray entity still deletes the valid
ones.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frankrousseau
frankrousseau merged commit a34292f into cgwire:main Jul 10, 2026
14 checks passed
@frankrousseau
frankrousseau deleted the fix-delete-entities-skip-invalid branch July 10, 2026 12:46
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

Successfully merging this pull request may close these issues.

1 participant