From 29d2b9e8d11c7ae6caa99d8f832221744da556bf Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 13 Nov 2024 11:39:00 +0000 Subject: [PATCH] - Removal needs to happen before comparisions --- ui/workers/gather_encounter_locations.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/workers/gather_encounter_locations.py b/ui/workers/gather_encounter_locations.py index ef6812d..d862374 100644 --- a/ui/workers/gather_encounter_locations.py +++ b/ui/workers/gather_encounter_locations.py @@ -60,8 +60,14 @@ class GatherEncountersWorker(QRunnable): if form and name in form: form = form.replace(name, "").strip() + if form and form.startswith("Female"): + form = form.replace("Female", "").strip() + + if form and form.startswith("Male"): + form = form.replace("Male", "").strip() + if form and form in default_forms: - form = None + form = None if name == "Unown" and (form != "!" and form != "?"): form = None @@ -78,12 +84,6 @@ class GatherEncountersWorker(QRunnable): if name.lower() == "ho-oh": name = "Ho-Oh" - if form and form.startswith("Female"): - form = form.replace("Female", "").strip() - - if form and form.startswith("Male"): - form = form.replace("Male", "").strip() - if form == "": form = None