mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Fixed issue with ordering breaking if there is no order is set in the URL
This commit is contained in:
@@ -76,7 +76,7 @@ def orderby(request, field, attr):
|
||||
|
||||
dict_ = request.GET.copy()
|
||||
|
||||
if dict_[field] == attr:
|
||||
if dict_.__contains__(field) and dict_[field] == attr:
|
||||
if not dict_[field].startswith("-"):
|
||||
dict_[field] = "-" + attr
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user