diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-08-03 16:58:17 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:38:32 +0200 | 
| commit | 3372c744f399980c97cc1c1bd30102c389ecf157 (patch) | |
| tree | 9aab65cb3c169edbf50d995208d89eecc4bfb250 /ishtar_common/views.py | |
| parent | 57e35ce0c26ee36f0345e6adf00ea3f63e7235f0 (diff) | |
| download | Ishtar-3372c744f399980c97cc1c1bd30102c389ecf157.tar.bz2 Ishtar-3372c744f399980c97cc1c1bd30102c389ecf157.zip  | |
✨ Imports groups - form: filter add button by availability - importer file is required
Diffstat (limited to 'ishtar_common/views.py')
| -rw-r--r-- | ishtar_common/views.py | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py index b58ab024a..31d3d9516 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -1598,7 +1598,12 @@ class ImportListView(IshtarMixin, LoginRequiredMixin, ListView):      def get_context_data(self, **kwargs):          dct = super(ImportListView, self).get_context_data(**kwargs) -        dct["autorefresh_available"] = settings.USE_BACKGROUND_TASK +        dct.update({ +            "autorefresh_available": settings.USE_BACKGROUND_TASK, +            "has_import_table": models.ImporterType.objects.filter(available=True, is_import=True, type='tab').count(), +            "has_import_gis": models.ImporterType.objects.filter(available=True, is_import=True, type='gis').count(), +            "has_import_group": models.ImporterGroup.objects.filter(available=True).count(), +        })          return dct  | 
