From efd97a67b6d41f9d84e290f0d823e00b57790492 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 1 Apr 2020 14:18:10 +1100 Subject: [PATCH 1/2] Make ethnicity free text --- .../Performers/PerformerDetails/PerformerDetailsPanel.tsx | 6 +++--- .../performers/PerformerDetails/PerformerDetailsPanel.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx index a031860e2b3..753128324ac 100644 --- a/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx +++ b/ui/v2.5/src/components/Performers/PerformerDetails/PerformerDetailsPanel.tsx @@ -221,12 +221,12 @@ export const PerformerDetailsPanel: React.FC = ({ } function renderEthnicity() { - return TableUtils.renderHtmlSelect({ + return TableUtils.renderInputGroup({ title: "Ethnicity", value: ethnicity, isEditing: !!isEditing, - onChange: (value: string) => setEthnicity(value), - selectOptions: ["white", "black", "asian", "hispanic"] + placeholder: "Ethnicity", + onChange: setEthnicity }); } diff --git a/ui/v2/src/components/performers/PerformerDetails/PerformerDetailsPanel.tsx b/ui/v2/src/components/performers/PerformerDetails/PerformerDetailsPanel.tsx index 261256995bf..c8d6438d4d4 100644 --- a/ui/v2/src/components/performers/PerformerDetails/PerformerDetailsPanel.tsx +++ b/ui/v2/src/components/performers/PerformerDetails/PerformerDetailsPanel.tsx @@ -228,12 +228,12 @@ export const PerformerDetailsPanel: FunctionComponent = } function renderEthnicity() { - return TableUtils.renderHtmlSelect({ + return TableUtils.renderInputGroup({ title: "Ethnicity", value: ethnicity, isEditing: !!props.isEditing, - onChange: (value: string) => setEthnicity(value), - selectOptions: ["white", "black", "asian", "hispanic"], + placeholder: "Ethnicity", + onChange: setEthnicity }); } From f89f2204540f3860a21c21bcc2312f9ec93facd6 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 1 Apr 2020 14:18:48 +1100 Subject: [PATCH 2/2] Fix panic in freeones scraper for other ethnicity --- pkg/scraper/freeones.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/scraper/freeones.go b/pkg/scraper/freeones.go index 94bde0e1989..db797b4963c 100644 --- a/pkg/scraper/freeones.go +++ b/pkg/scraper/freeones.go @@ -278,7 +278,9 @@ func getEthnicity(ethnicity string) string { case "Asian": return "asian" default: - panic("unknown ethnicity") + // #367 - unknown ethnicity shouldn't cause the entire operation to + // fail. Just return the original string instead + return ethnicity } }