reverse sorting in location list and when determining point location

This commit is contained in:
Laura Klünder 2016-12-19 18:13:14 +01:00
parent 5facc7827d
commit 1c70dbefc2
2 changed files with 2 additions and 2 deletions

View file

@ -169,7 +169,7 @@ class LocationViewSet(CachedReadOnlyViewSetMixin, ViewSet):
def list(self, request, **kwargs):
locations = []
locations += sorted(filter_queryset_by_package_access(request, AreaLocation.objects.filter(can_search=True)),
key=AreaLocation.get_sort_key)
key=AreaLocation.get_sort_key, reverse=True)
locations += list(filter_queryset_by_package_access(request, LocationGroup.objects.filter(can_search=True)))
return Response([location.to_location_json() for location in locations])