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

@@ -8,6 +8,7 @@ from dcim.api.nested_serializers import (
NestedRegionSerializer, NestedSiteSerializer,
)
from dcim.models import Device, DeviceRole, Platform, Rack, Region, Site
from extras.choices import *
from extras.constants import *
from extras.models import (
ConfigContext, ExportTemplate, Graph, ImageAttachment, ObjectChange, ReportResult, Tag,
@@ -255,7 +256,7 @@ class ObjectChangeSerializer(serializers.ModelSerializer):
read_only=True
)
action = ChoiceField(
choices=OBJECTCHANGE_ACTION_CHOICES,
choices=ObjectChangeActionChoices,
read_only=True
)
changed_object_type = ContentTypeField(