stash icon indicating copy to clipboard operation
stash copied to clipboard

[Bug Report] Studio can have a duplicated StashID attached

Open mmenanno opened this issue 3 years ago • 0 comments

Describe the bug Studios are able to get into a state where they have a duplicate StashID attached to them. When attempting to clean that up using the delete button beside one of them, it deletes both. However I don't think deleting both is really the bug here, the bug is more than it can get in this state at all.

To Reproduce I'm not sure what normal workflow leads to this case, so the best way I can reproduces is via the playground. Steps to reproduce the behavior:

  1. Go to /playground
  2. Add the mutation as:
mutation Studio($input: StudioUpdateInput!) {
  studioUpdate(input: $input) {
    id
    name
    url
    stash_ids {
      endpoint
      stash_id
    }
    updated_at
  }
}
  1. Pasting in the ID of the studio you would like to test with, use variables like:
{
  "input": {
    "id": 571,
    "stash_ids": [
      {
        "endpoint": "https://stashdb.org/graphql",
        "stash_id": "this-is-a-fake-id"
      },
      {
        "endpoint": "https://stashdb.org/graphql",
        "stash_id": "this-is-a-fake-id"
      }
    ]
  }
}
  1. Navigate to your test studio in stash and click edit, you will see the duplicated id attached: image

Expected behavior If a flow attempts to add a duplicate stashid, it would be skipped (probably no need to throw an error since the object is already in the intended state)

Screenshots image

Stash Version: (from Settings -> About): v0.16.1-1-gcba0fddf

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version 103.0.5060.134 (Official Build) (arm64)

Additional context N/A

mmenanno avatar Aug 04 '22 15:08 mmenanno