mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 01:38:50 -03:30
Merge pull request #2410 from AlanCoding/filterama
Show filterable: False if not filterable
This commit is contained in:
@@ -67,6 +67,8 @@ class Metadata(metadata.SimpleMetadata):
|
|||||||
if field.field_name == model_field.name:
|
if field.field_name == model_field.name:
|
||||||
field_info['filterable'] = True
|
field_info['filterable'] = True
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
field_info['filterable'] = False
|
||||||
|
|
||||||
# Indicate if a field has a default value.
|
# Indicate if a field has a default value.
|
||||||
# FIXME: Still isn't showing all default values?
|
# FIXME: Still isn't showing all default values?
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ def test_filterable_fields(options, instance, admin_user):
|
|||||||
assert 'filterable' in filterable_info
|
assert 'filterable' in filterable_info
|
||||||
assert filterable_info['filterable'] is True
|
assert filterable_info['filterable'] is True
|
||||||
|
|
||||||
assert 'filterable' not in non_filterable_info
|
assert not non_filterable_info['filterable']
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
|
|||||||
Reference in New Issue
Block a user