From 95a4e2bdd36a4b41ee92882322e648f856926770 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 30 Oct 2022 16:14:57 +0100 Subject: [PATCH] Fix paths import --- src/character/management/commands/import_paths.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/character/management/commands/import_paths.py b/src/character/management/commands/import_paths.py index 751cd25..2217cd3 100644 --- a/src/character/management/commands/import_paths.py +++ b/src/character/management/commands/import_paths.py @@ -39,7 +39,7 @@ class Command(BaseCommand): race = None if category == Path.Category.RACE: race = self.get_race(name) - notes = self.get_notes(name) + notes = self.get_notes() path, _ = Path.objects.update_or_create( name=name, @@ -95,10 +95,10 @@ class Command(BaseCommand): except Exception: self.stdout.write(self.style.WARNING(f"Couldn't find race for {path_name}")) - def get_notes(self, path_name: str) -> str: + def get_notes(self) -> str: try: return self.selenium.find_element( - By.CLASS_NAME, "field--name-description" + By.CSS_SELECTOR, ".mt-3 > .field--name-description" ).text.strip() except Exception: return ""