path was doubled

If I wanted to import path "maki", that tried to open "maki/maki/pictogram.svg"
This commit is contained in:
datendelphin 2024-02-25 10:50:13 +01:00 committed by GitHub
parent 76ed2200cf
commit 6c07aefa70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,6 +62,6 @@ class Command(BaseCommand):
if path.name != self.path.name: # Subfolders only
picto.category = path.name
picto.attribution = self.attribution
with (path / filename).open("rb") as f:
with (filename).open("rb") as f:
picto.pictogram.save(filename.name, File(f), save=True)
self.stdout.write(f"✔ Imported pictogram {filename}.")