summaryrefslogtreecommitdiff
path: root/ishtar_common/models_imports.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-11-09 12:19:56 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:38:32 +0200
commit90dd4189664694779ce474757e9c88da5ab2ac6e (patch)
tree872612a89a432ed8d2f61dce5fd37a56eca7d305 /ishtar_common/models_imports.py
parentafa3e0e21841eaaf8bfa7bec68fa6e94dbfe7d71 (diff)
downloadIshtar-90dd4189664694779ce474757e9c88da5ab2ac6e.tar.bz2
Ishtar-90dd4189664694779ce474757e9c88da5ab2ac6e.zip
✨ imports: add xlsm to available extensions
Diffstat (limited to 'ishtar_common/models_imports.py')
-rw-r--r--ishtar_common/models_imports.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py
index 2967c18aa..6cb95b0ee 100644
--- a/ishtar_common/models_imports.py
+++ b/ishtar_common/models_imports.py
@@ -2119,7 +2119,8 @@ class Import(BaseImport):
if not settings.USE_LIBREOFFICE or not self.imported_file or not UnoCalc:
return
name = self.imported_file.name.lower()
- if not name.endswith(".ods") and not name.endswith(".xls") and not name.endswith(".xlsx"):
+ ext = name.split(".")[-1]
+ if ext not in ("ods", "xls", "xlsx", "xlsm"):
return
imported_file_path = os.path.abspath(self.imported_file.path)
media_root = os.path.abspath(settings.MEDIA_ROOT)