Skip to content
Snippets Groups Projects
Commit 9e5a510e authored by Dan Braghis's avatar Dan Braghis
Browse files

Fix attribute error

parent fd29a9bf
No related branches found
No related tags found
No related merge requests found
......@@ -468,7 +468,10 @@ class JSONOrderable(models.QuerySet):
)
def build_json_order_by(field):
if field.replace('-', '') not in REQUIRED_BLOCK_NAMES:
try:
if field.replace('-', '') not in REQUIRED_BLOCK_NAMES:
return field
except AttributeError:
return field
if field[0] == '-':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment