Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions chartit/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ def _validate_field_lookup_term(model, term, query):
return term

if terms[0] not in model_fields:
raise APIInputError("Field %r does not exist. Valid lookups are %s."
% (terms[0], ', '.join(model_fields)))
return terms[0]
if len(terms) == 1:
return model._meta.get_field(terms[0]).verbose_name
else:
Expand Down