1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

show filterable: False if not filterable

This commit is contained in:
AlanCoding 2018-07-03 15:21:10 -04:00
parent 4c1bc49258
commit b97626bf37
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B
2 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,8 @@ class Metadata(metadata.SimpleMetadata):
if field.field_name == model_field.name:
field_info['filterable'] = True
break
else:
field_info['filterable'] = False
# Indicate if a field has a default value.
# FIXME: Still isn't showing all default values?

View File

@ -106,4 +106,4 @@ def test_filterable_fields(options, instance, admin_user):
assert 'filterable' in filterable_info
assert filterable_info['filterable'] is True
assert 'filterable' not in non_filterable_info
assert not non_filterable_info['filterable']