diff options
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: | 
