From 6c07aefa7056c61c002ff2a71887f7457d85ba5b Mon Sep 17 00:00:00 2001 From: datendelphin Date: Sun, 25 Feb 2024 10:50:13 +0100 Subject: [PATCH] path was doubled If I wanted to import path "maki", that tried to open "maki/maki/pictogram.svg" --- umap/management/commands/import_pictograms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/management/commands/import_pictograms.py b/umap/management/commands/import_pictograms.py index 1adf2447..601b11ae 100644 --- a/umap/management/commands/import_pictograms.py +++ b/umap/management/commands/import_pictograms.py @@ -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}.")