From 920fbbeea48f3905115ef5ee90e344c863216a44 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 30 Oct 2022 16:11:57 +0100 Subject: [PATCH] Add missing descriptions to capabilities --- src/character/management/commands/import_capabilities.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/character/management/commands/import_capabilities.py b/src/character/management/commands/import_capabilities.py index 72f2b94..e81ecab 100644 --- a/src/character/management/commands/import_capabilities.py +++ b/src/character/management/commands/import_capabilities.py @@ -44,6 +44,11 @@ class Command(BaseCommand): spell = True name = name.replace("*", "") name = name.strip() + description = ( + card.find_element(By.CLASS_NAME, "field--name-description") + .text.strip() + .replace("’", "'") + ) try: capability, _ = Capability.objects.update_or_create( name=name, @@ -52,6 +57,7 @@ class Command(BaseCommand): "path": path, "limited": limited, "spell": spell, + "description": description, "url": "https://www.co-drs.org/fr/jeu/capacites", }, )