MBS-14220: Add _conflicting_entity_path when missing #3700
Merged
+30
−0
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.
Fix MBS-14220
Problem
Trying to remove the disambiguation in a specific release group series causes an ISE. While this is the only RG series of this name, there's a release series of the same name (a duplicate, and in fact probably the RG series should be dropped). This was then hitting a broken error check.
Solution
Edit::Generic::Editsays:Sub-classes that consume Edit::Role::CheckDuplicates are required to implement _conflicting_entity_path. N.B. This is not checked at compile-time.This was not the case for a fair amount of them, including all the
::Createedits and bothPlace::andSeries::Edit.This is a hard issue to hit. AFAICT it only causes issues when entering an edit removing a disambiguation that would cause the entity to clash with another entity of the same type and with no disambiguation. This happens relatively often with artists but it is unsurprising it took a long time for someone to hit it and report it for series.
With the current implementation, I'm not sure we actually need this on
::Createedits, but it probably cannot hurt to future-proof them just in case.Testing
Manually, adding series of the same name with and without a disambiguation and then trying to blank the disambiguation of the one that had it. It originally ISEd, with this change it correctly leaves the "we couldn't apply this" edit note instead.