We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58c7ad2 commit 7cb067bCopy full SHA for 7cb067b
netbox_custom_objects/api/serializers.py
@@ -41,7 +41,7 @@ class Meta:
41
def validate(self, attrs):
42
app_label = attrs.pop('app_label', None)
43
model = attrs.pop('model', None)
44
- if attrs['type'] == 'object':
+ if attrs['type'] in [CustomFieldTypeChoices.TYPE_OBJECT, CustomFieldTypeChoices.TYPE_MULTIOBJECT]:
45
try:
46
attrs['related_object_type'] = ContentType.objects.get(app_label=app_label, model=model)
47
except ContentType.DoesNotExist:
0 commit comments