Skip to content

Commit 4aa4a99

Browse files
author
Brandon Taylor
committed
Merge pull request jazzband#59 from PyKaB/patch-1
Make fast query with "count(*)" instead selecting all data
2 parents e7da934 + 6195cd7 commit 4aa4a99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adminsortable/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
def get_is_sortable(objects):
2-
if len(objects) > 1:
2+
if objects.count() > 1:
33
return True
44
return False

0 commit comments

Comments
 (0)