mirror of
https://github.com/jazzband/django-admin-sortable.git
synced 2026-05-20 12:51:56 +00:00
Merge pull request #59 from PyKaB/patch-1
Make fast query with "count(*)" instead selecting all data
This commit is contained in:
commit
4aa4a99ff6
1 changed files with 1 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
def get_is_sortable(objects):
|
def get_is_sortable(objects):
|
||||||
if len(objects) > 1:
|
if objects.count() > 1:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue