Fix issues linking a tag that already exists in the tag list (#6395)

* Add stash-id to existing when linking tag
* Validate id list for duplicates in find queries
* Filter out duplicate ids after linking tag
This commit is contained in:
WithoutPants
2025-12-11 11:45:56 +11:00
committed by GitHub
parent 5f0d4e811d
commit 0980daa99e
18 changed files with 71 additions and 24 deletions

View File

@@ -6,7 +6,6 @@ import (
"strconv"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/sliceutil/stringslice"
)
func (r *queryResolver) FindFolder(ctx context.Context, id *string, path *string) (*models.Folder, error) {
@@ -49,7 +48,7 @@ func (r *queryResolver) FindFolders(
) (ret *FindFoldersResultType, err error) {
var folderIDs []models.FolderID
if len(ids) > 0 {
folderIDsInt, err := stringslice.StringSliceToIntSlice(ids)
folderIDsInt, err := handleIDList(ids, "ids")
if err != nil {
return nil, err
}