mirror of
https://github.com/stashapp/stash.git
synced 2025-12-08 01:13:09 +01:00
Make ethnicity freetext and fix freeones ethnicity panic (#431)
* Make ethnicity free text * Fix panic in freeones scraper for other ethnicity
This commit is contained in:
parent
0bbb2bd1d0
commit
82201e23e0
3 changed files with 9 additions and 7 deletions
|
|
@ -278,7 +278,9 @@ func getEthnicity(ethnicity string) string {
|
||||||
case "Asian":
|
case "Asian":
|
||||||
return "asian"
|
return "asian"
|
||||||
default:
|
default:
|
||||||
panic("unknown ethnicity")
|
// #367 - unknown ethnicity shouldn't cause the entire operation to
|
||||||
|
// fail. Just return the original string instead
|
||||||
|
return ethnicity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,12 +221,12 @@ export const PerformerDetailsPanel: React.FC<IPerformerDetails> = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderEthnicity() {
|
function renderEthnicity() {
|
||||||
return TableUtils.renderHtmlSelect({
|
return TableUtils.renderInputGroup({
|
||||||
title: "Ethnicity",
|
title: "Ethnicity",
|
||||||
value: ethnicity,
|
value: ethnicity,
|
||||||
isEditing: !!isEditing,
|
isEditing: !!isEditing,
|
||||||
onChange: (value: string) => setEthnicity(value),
|
placeholder: "Ethnicity",
|
||||||
selectOptions: ["white", "black", "asian", "hispanic"]
|
onChange: setEthnicity
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -228,12 +228,12 @@ export const PerformerDetailsPanel: FunctionComponent<IPerformerDetailsProps> =
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderEthnicity() {
|
function renderEthnicity() {
|
||||||
return TableUtils.renderHtmlSelect({
|
return TableUtils.renderInputGroup({
|
||||||
title: "Ethnicity",
|
title: "Ethnicity",
|
||||||
value: ethnicity,
|
value: ethnicity,
|
||||||
isEditing: !!props.isEditing,
|
isEditing: !!props.isEditing,
|
||||||
onChange: (value: string) => setEthnicity(value),
|
placeholder: "Ethnicity",
|
||||||
selectOptions: ["white", "black", "asian", "hispanic"],
|
onChange: setEthnicity
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue