mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 08:22:15 +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()
|
dict_ = request.GET.copy()
|
||||||
|
|
||||||
if dict_[field] == attr:
|
if dict_.__contains__(field) and dict_[field] == attr:
|
||||||
if not dict_[field].startswith("-"):
|
if not dict_[field].startswith("-"):
|
||||||
dict_[field] = "-" + attr
|
dict_[field] = "-" + attr
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user