mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Order before taking a slice of the QS
This commit is contained in:
@@ -160,12 +160,13 @@ class HrAdminApplications(ListView):
|
|||||||
# If a invalid order as been passed, correct it
|
# If a invalid order as been passed, correct it
|
||||||
if not order in ['id', 'corporation__name', 'character__name']:
|
if not order in ['id', 'corporation__name', 'character__name']:
|
||||||
order = 'id'
|
order = 'id'
|
||||||
|
apps = apps.order_by(order)
|
||||||
|
|
||||||
# If we've got a short search string, only get the first 50
|
# If we've got a short search string, only get the first 50
|
||||||
if query and len(query) < 3:
|
if query and len(query) < 3:
|
||||||
apps = apps[:50]
|
apps = apps[:50]
|
||||||
|
|
||||||
return apps.order_by(order)
|
return apps
|
||||||
|
|
||||||
|
|
||||||
class HrUpdateApplication(BaseDetailView):
|
class HrUpdateApplication(BaseDetailView):
|
||||||
|
|||||||
Reference in New Issue
Block a user