Well that wasn't clever of me

This commit is contained in:
2020-05-26 13:42:37 +01:00
parent 7356d020b2
commit 0bbc23853d
3 changed files with 4 additions and 3 deletions

View File

@@ -156,6 +156,6 @@ class GenericListView(generic.ListView):
object_list = self.model.objects.filter(filter)
orderBy = self.request.GET.get('orderBy', "name")
if orderBy is not "":
if orderBy != "":
object_list = object_list.order_by(orderBy)
return object_list