Skip to content

Commit

Permalink
Fix syntax error from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed May 1, 2017
1 parent 3d58394 commit bb4322b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions django_filters/rest_framework/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,12 @@ def to_html(self, request, queryset, view):

def get_coreschema_field(self, field):
if isinstance(field, filters.NumberFilter):
return compat.coreschema.Number(
description=six.text_type(field.field.help_text)
)
field_cls = compat.coreschema.Number
else:
return compat.coreschema.String(
description=six.text_type(field.field.help_text)
)
field_cls = compat.coreschema.String
return field_cls(
description=six.text_type(field.extra.get('help_text', ''))
)

def get_schema_fields(self, view):
# This is not compatible with widgets where the query param differs from the
Expand Down

0 comments on commit bb4322b

Please sign in to comment.