summaryrefslogtreecommitdiff
path: root/ishtar_common/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r--ishtar_common/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index aec8fa9f4..8f8ecb5a6 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -2146,7 +2146,7 @@ class ImportGroupDeleteView(IshtarMixin, LoginRequiredMixin, DeleteView):
class ImportCSVView(IshtarMixin, LoginRequiredMixin, TemplateView):
template_name = "ishtar/blocks/view_import_csv.html"
ATTRIBUTES = {
- "source": "imported_file",
+ "source": "get_imported_values",
"error": "error_file",
"result": "result_file",
"match": "match_file"
@@ -2169,6 +2169,8 @@ class ImportCSVView(IshtarMixin, LoginRequiredMixin, TemplateView):
self.import_item = q.all()[0]
attribute = self.ATTRIBUTES[kwargs["target"]]
self.csv_file = getattr(self.import_item, attribute)
+ if callable(self.csv_file):
+ self.csv_file = self.csv_file()
if not self.csv_file:
raise Http404()
return super().get(request, *args, **kwargs)