stash-box icon indicating copy to clipboard operation
stash-box copied to clipboard

[Bug Report] Replacing Performer in Scene is Added Instead

Open AdultSun opened this issue 2 years ago • 1 comments

Describe the bug Got a bug report on Discord, a user tried to remove an ambiguous performer from a scene and replace it with the correct performer. At the same time, they submitted an edit to rename that ambiguous performer with something more specific. After getting both edits approved, the scene now has both performers listed. The correct one was added, but the old performer is also still there even though the relevant edit still claims it was removed.

I'm guessing Stash-Box got confused because the performer edit must have passed before the scene edit. Maybe it couldn't find the performer it was asked to remove anymore?

Scene (NSFW): https://stashdb.org/scenes/b682bda5-4e23-4338-a399-9dd5ec36a5b5#edits

Scene edit: https://stashdb.org/edits/97397dfb-93c0-4d02-8f40-b843ff84c251

Performer edit (NSFW): https://stashdb.org/edits/785f1d8c-a264-4f27-9b03-6650a420ed1c

AdultSun avatar Feb 06 '23 00:02 AdultSun

When resolving appearances the concatenated id+alias are considered as the id, for purposes of uniqueness. The advantage of this is we can use a generalized process to resolve the final set of appearances.

What I'm guessing happened is when the rename was applied it included the addition of an alias to all scenes, so when the scene change was applied the removal no longer matched, resulting in just an addition and no removal.

The correct solution I think would be to not consider aliases when removing appearances since it's not particularly important. Unfortunately this is a bit tricky since as mentioned the edit application uses a generalized function which does not allow for differentiating between removals and additions.

Since this is a bit of an edge-case, I'll punt on this for now.

InfiniteStash avatar Jul 10 '23 06:07 InfiniteStash