mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
Fix paths import
This commit is contained in:
parent
920fbbeea4
commit
95a4e2bdd3
1 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@ class Command(BaseCommand):
|
||||||
race = None
|
race = None
|
||||||
if category == Path.Category.RACE:
|
if category == Path.Category.RACE:
|
||||||
race = self.get_race(name)
|
race = self.get_race(name)
|
||||||
notes = self.get_notes(name)
|
notes = self.get_notes()
|
||||||
|
|
||||||
path, _ = Path.objects.update_or_create(
|
path, _ = Path.objects.update_or_create(
|
||||||
name=name,
|
name=name,
|
||||||
|
@ -95,10 +95,10 @@ class Command(BaseCommand):
|
||||||
except Exception:
|
except Exception:
|
||||||
self.stdout.write(self.style.WARNING(f"Couldn't find race for {path_name}"))
|
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:
|
try:
|
||||||
return self.selenium.find_element(
|
return self.selenium.find_element(
|
||||||
By.CLASS_NAME, "field--name-description"
|
By.CSS_SELECTOR, ".mt-3 > .field--name-description"
|
||||||
).text.strip()
|
).text.strip()
|
||||||
except Exception:
|
except Exception:
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Reference in a new issue