1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

CustomField.filter_logic to slug

This commit is contained in:
Jeremy Stretch
2019-12-04 21:09:02 -05:00
parent 3ff22bea56
commit bfea77baa5
7 changed files with 61 additions and 23 deletions

View File

@@ -31,3 +31,22 @@ class CustomFieldTypeChoices(ChoiceSet):
TYPE_URL: 500,
TYPE_SELECT: 600,
}
class CustomFieldFilterLogicChoices(ChoiceSet):
FILTER_DISABLED = 'disabled'
FILTER_LOOSE = 'loose'
FILTER_EXACT = 'exact'
CHOICES = (
(FILTER_DISABLED, 'Disabled'),
(FILTER_LOOSE, 'Loose'),
(FILTER_EXACT, 'Exact'),
)
LEGACY_MAP = {
FILTER_DISABLED: 0,
FILTER_LOOSE: 1,
FILTER_EXACT: 2,
}