diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/admin.py | 9 | 
1 files changed, 2 insertions, 7 deletions
diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py index f5729d9de..3ae767393 100644 --- a/ishtar_common/admin.py +++ b/ishtar_common/admin.py @@ -170,14 +170,9 @@ def export_as_csv_action(          if hasattr(modeladmin, "CSV_FIELD_ORDER"):              field_order = modeladmin.CSV_FIELD_ORDER -            def sort_csv(value): -                if value not in field_order: -                    return 1000 -                else: -                    return field_order.index(value) -              field_names = sorted( -                field_names, key=sort_csv +                field_names, +                key=lambda x: field_order.index(x) if x in field_order else 1000              )          response = HttpResponse(content_type="text/csv")  | 
