mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7771: Group assignment should be optional when creating contacts via REST API
This commit is contained in:
@@ -79,7 +79,7 @@ class ContactRoleSerializer(PrimaryModelSerializer):
|
||||
|
||||
class ContactSerializer(PrimaryModelSerializer):
|
||||
url = serializers.HyperlinkedIdentityField(view_name='tenancy-api:contact-detail')
|
||||
group = NestedContactGroupSerializer(required=False, allow_null=True)
|
||||
group = NestedContactGroupSerializer(required=False, allow_null=True, default=None)
|
||||
|
||||
class Meta:
|
||||
model = Contact
|
||||
|
@@ -200,7 +200,6 @@ class ContactTest(APIViewTestCases.APIViewTestCase):
|
||||
},
|
||||
{
|
||||
'name': 'Contact 6',
|
||||
'group': contact_groups[1].pk,
|
||||
},
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user