mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Fix scraped tag name being used in matched scraped tags field (#5462)
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
|||||||
ObjectScrapeResult,
|
ObjectScrapeResult,
|
||||||
ScrapeResult,
|
ScrapeResult,
|
||||||
} from "src/components/Shared/ScrapeDialog/scrapeResult";
|
} from "src/components/Shared/ScrapeDialog/scrapeResult";
|
||||||
import { TagSelect } from "src/components/Tags/TagSelect";
|
import { TagIDSelect } from "src/components/Tags/TagSelect";
|
||||||
import { StudioSelect } from "src/components/Studios/StudioSelect";
|
import { StudioSelect } from "src/components/Studios/StudioSelect";
|
||||||
import { GroupSelect } from "src/components/Groups/GroupSelect";
|
import { GroupSelect } from "src/components/Groups/GroupSelect";
|
||||||
|
|
||||||
@@ -269,17 +269,12 @@ export const ScrapedTagsRow: React.FC<
|
|||||||
: scrapeResult.originalValue;
|
: scrapeResult.originalValue;
|
||||||
const value = resultValue ?? [];
|
const value = resultValue ?? [];
|
||||||
|
|
||||||
const selectValue = value.map((p) => {
|
const selectValue = value.map((p) => p.stored_id ?? "");
|
||||||
const aliases: string[] = [];
|
|
||||||
return {
|
|
||||||
id: p.stored_id ?? "",
|
|
||||||
name: p.name ?? "",
|
|
||||||
aliases,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
|
// we need to use TagIDSelect here because we want to use the local name
|
||||||
|
// of the tag instead of the name from the source
|
||||||
return (
|
return (
|
||||||
<TagSelect
|
<TagIDSelect
|
||||||
isMulti
|
isMulti
|
||||||
className="form-control"
|
className="form-control"
|
||||||
isDisabled={!isNew}
|
isDisabled={!isNew}
|
||||||
@@ -289,7 +284,7 @@ export const ScrapedTagsRow: React.FC<
|
|||||||
onChangeFn(items.map((p) => ({ ...p, stored_id: p.id })));
|
onChangeFn(items.map((p) => ({ ...p, stored_id: p.id })));
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
values={selectValue}
|
ids={selectValue}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user