Skip to content

Commit 80f5eea

Browse files
committed
Fix issues loading demo data
1 parent b1da374 commit 80f5eea

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

netbox/dcim/signals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ def nullify_connected_endpoints(instance, **kwargs):
128128

129129

130130
@receiver(post_save, sender=FrontPort)
131-
def extend_rearport_cable_paths(instance, created, **kwargs):
131+
def extend_rearport_cable_paths(instance, created, raw, **kwargs):
132132
"""
133133
When a new FrontPort is created, add it to any CablePaths which end at its corresponding RearPort.
134134
"""
135-
if created:
135+
if created and not raw:
136136
rearport = instance.rear_port
137137
for cablepath in CablePath.objects.filter(_nodes__contains=rearport):
138138
cablepath.retrace()

netbox/utilities/serializers/json.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from django.contrib.postgres.fields import ArrayField
2-
from django.core.serializers.json import Serializer as Serializer_
2+
from django.core.serializers.json import Deserializer, Serializer as Serializer_ # noqa
33
from django.utils.encoding import is_protected_type
44

5+
# NOTE: Module must contain both Serializer and Deserializer
6+
57

68
class Serializer(Serializer_):
79
"""

0 commit comments

Comments
 (0)