diff --git a/ESSArch_Core/frontend/static/frontend/lang/sv/export.ts b/ESSArch_Core/frontend/static/frontend/lang/sv/export.ts index 5700188db..58efc43f2 100644 --- a/ESSArch_Core/frontend/static/frontend/lang/sv/export.ts +++ b/ESSArch_Core/frontend/static/frontend/lang/sv/export.ts @@ -5,7 +5,7 @@ export default ($translateProvider: ng.translate.ITranslateProvider) => { EXPORT: 'Export', EXPORT_AS_JSON: 'Exportera som JSON', EXPORT_PROFILE: 'Exportera profil', - EXPORT_SUBMISSION_AGREEMENT: 'Exportera leveransöverenskollelse', + EXPORT_SUBMISSION_AGREEMENT: 'Exportera leveransöverenskommelse', }, }); }; diff --git a/ESSArch_Core/storage/models.py b/ESSArch_Core/storage/models.py index f86877833..1498ba44a 100644 --- a/ESSArch_Core/storage/models.py +++ b/ESSArch_Core/storage/models.py @@ -545,8 +545,8 @@ def migratable(self, export_path='', missing_storage=False): def non_migratable(self): return self.exclude(pk__in=self.migratable()) - def natural_sort(self): - return natural_sort(self, 'medium_id') + def natural_sort(self, column='medium_id'): + return natural_sort(self, column) def fastest(self): container = Case( @@ -734,8 +734,8 @@ def readable(self): storage_medium__status__in=[20, 30] ) - def natural_sort(self): - return natural_sort(self, 'content_location_value') + def natural_sort(self, column='content_location_value'): + return natural_sort(self, column) def fastest(self): container = Case( @@ -763,7 +763,8 @@ def fastest(self): remote=remote, storage_type=storage_type, content_location_value_int=content_location_value_int, - ).order_by('remote', 'container_order', 'storage_type', 'storage_medium', 'content_location_value_int') + ).order_by('remote', 'container_order', 'storage_type').natural_sort('storage_medium__medium_id' + ).order_by('content_location_value_int') class StorageObject(models.Model): @@ -1092,8 +1093,8 @@ def __str__(self): class TapeSlotQueryset(models.QuerySet): - def natural_sort(self): - return natural_sort(self, 'medium_id') + def natural_sort(self, column='medium_id'): + return natural_sort(self, column) class TapeSlot(models.Model):