From 2bc97764c7de7db76183d2ce008f06b84082e08f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 15 Sep 2019 19:45:59 +1000 Subject: [PATCH] Allow more file formats for BOM import --- InvenTree/part/bom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/bom.py b/InvenTree/part/bom.py index baf46e8618..d23cb02032 100644 --- a/InvenTree/part/bom.py +++ b/InvenTree/part/bom.py @@ -10,13 +10,13 @@ import os from django.utils.translation import gettext_lazy as _ from django.core.exceptions import ValidationError -from InvenTree.helpers import DownloadFile +from InvenTree.helpers import DownloadFile, GetExportFormats def IsValidBOMFormat(fmt): """ Test if a file format specifier is in the valid list of BOM file formats """ - return fmt.strip().lower() in ['csv', 'xls', 'xlsx', 'tsv'] + return fmt.strip().lower() in GetExportFormats() def MakeBomTemplate(fmt):