mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +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 not order in ['id', 'corporation__name', 'character__name']:
|
||||
order = 'id'
|
||||
apps = apps.order_by(order)
|
||||
|
||||
# If we've got a short search string, only get the first 50
|
||||
if query and len(query) < 3:
|
||||
apps = apps[:50]
|
||||
|
||||
return apps.order_by(order)
|
||||
return apps
|
||||
|
||||
|
||||
class HrUpdateApplication(BaseDetailView):
|
||||
|
||||
Reference in New Issue
Block a user