Fix incorrect URL field in studio exclusions (#5743)

This commit is contained in:
WithoutPants
2025-03-20 08:29:32 +11:00
committed by GitHub
parent 6f848f7f1c
commit 81f642b8b8
2 changed files with 5 additions and 2 deletions

View File

@@ -81,4 +81,4 @@ export const PERFORMER_FIELDS = [
"details", "details",
]; ];
export const STUDIO_FIELDS = ["name", "image", "urls", "parent_studio"]; export const STUDIO_FIELDS = ["name", "image", "url", "parent_studio"];

View File

@@ -20,7 +20,10 @@ const StudioFieldSelect: React.FC<IProps> = ({
}) => { }) => {
const intl = useIntl(); const intl = useIntl();
const [excluded, setExcluded] = useState<Record<string, boolean>>( const [excluded, setExcluded] = useState<Record<string, boolean>>(
excludedFields.reduce((dict, field) => ({ ...dict, [field]: true }), {}) // filter out fields that aren't in STUDIO_FIELDS
excludedFields
.filter((field) => STUDIO_FIELDS.includes(field))
.reduce((dict, field) => ({ ...dict, [field]: true }), {})
); );
const toggleField = (field: string) => const toggleField = (field: string) =>