mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 17:59:11 -06:00
Fixes #7771: Group assignment should be optional when creating contacts via REST API
This commit is contained in:
parent
f7d0db9cd2
commit
2ce8ef5704
@ -3,6 +3,7 @@
|
||||
### Bug Fixes
|
||||
|
||||
* [#7756](https://github.com/netbox-community/netbox/issues/7756) - Fix AttributeError exception when editing an IP address assigned to a FHRPGroup
|
||||
* [#7771](https://github.com/netbox-community/netbox/issues/7771) - Group assignment should be optional when creating contacts via REST API
|
||||
|
||||
---
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user