diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-11 18:26:05 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-11 18:26:05 +0200 | 
| commit | ab1f6d5016175a1990892f1ea7408dfe495de103 (patch) | |
| tree | 42a6c85ea006b92e048c0e24b19a548b97e607e1 /ishtar_common/views.py | |
| parent | a549bc3c2560244ce6c71c877bd6654f7104660c (diff) | |
| download | Ishtar-ab1f6d5016175a1990892f1ea7408dfe495de103.tar.bz2 Ishtar-ab1f6d5016175a1990892f1ea7408dfe495de103.zip | |
Imports: catch configuration error - add configuration for WarehouseDivisionLink
Diffstat (limited to 'ishtar_common/views.py')
| -rw-r--r-- | ishtar_common/views.py | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 2c2a6fe7e..decbef589 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -1792,9 +1792,9 @@ class ImportListView(IshtarMixin, LoginRequiredMixin, ListView):      def get_queryset(self):          q = self.model.objects.exclude(state='AC')          if self.request.user.is_superuser: -            return q.order_by('-creation_date').order_by('-end_date') +            return q.order_by('-pk')          user = models.IshtarUser.objects.get(pk=self.request.user.pk) -        return q.filter(user=user).order_by('-end_date') +        return q.filter(user=user).order_by('-pk')      def post(self, request, *args, **kwargs):          for field in request.POST: @@ -2177,9 +2177,11 @@ class ImportStepByStepView(IshtarMixin, LoginRequiredMixin, TemplateView):      def transform_keys_to_label(self, path, cls, dct):          value_dct = {}          for k in dct: -            label = unicode( -                get_field_labels_from_path(cls, [k])[0] -            ) +            label = get_field_labels_from_path(cls, [k]) +            if label: +                label = unicode(label[0]) +            else: +                label = k              concat_path = u"__".join(list(path) + [k])              if concat_path in self.path_to_column: | 
