Remove duplicates from ScrapedTagsRow (#5733)

This commit is contained in:
WithoutPants 2025-03-19 08:04:39 +11:00 committed by GitHub
parent daed09e487
commit 7a4ff20d66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,6 +9,7 @@ import {
import { TagIDSelect } from "src/components/Tags/TagSelect";
import { StudioSelect } from "src/components/Studios/StudioSelect";
import { GroupSelect } from "src/components/Groups/GroupSelect";
import { uniq } from "lodash-es";
interface IScrapedStudioRow {
title: string;
@ -270,7 +271,7 @@ export const ScrapedTagsRow: React.FC<
: scrapeResult.originalValue;
const value = resultValue ?? [];
const selectValue = value.map((p) => p.stored_id ?? "");
const selectValue = uniq(value.map((p) => p.stored_id ?? ""));
// we need to use TagIDSelect here because we want to use the local name
// of the tag instead of the name from the source