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

ObjectChange.action to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-12-05 16:30:15 -05:00
parent 8efde811e9
commit 2bcbcd3458
11 changed files with 83 additions and 30 deletions

View File

@ -75,3 +75,26 @@ class CustomLinkButtonClassChoices(ChoiceSet):
(CLASS_DANGER, 'Danger (red)'),
(CLASS_LINK, 'None (link)'),
)
#
# ObjectChanges
#
class ObjectChangeActionChoices(ChoiceSet):
ACTION_CREATE = 'create'
ACTION_UPDATE = 'update'
ACTION_DELETE = 'delete'
CHOICES = (
(ACTION_CREATE, 'Created'),
(ACTION_UPDATE, 'Updated'),
(ACTION_DELETE, 'Deleted'),
)
LEGACY_MAP = {
ACTION_CREATE: 1,
ACTION_UPDATE: 2,
ACTION_DELETE: 3,
}