Fixes #4992: Add display_name to nested VRF serializer

This commit is contained in:
Jeremy Stretch 2020-08-13 09:44:01 -04:00
parent 3c395e7c9f
commit acd5f21866
3 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,10 @@
* [#4885](https://github.com/netbox-community/netbox/issues/4885) - Add MultiChoiceVar for custom scripts * [#4885](https://github.com/netbox-community/netbox/issues/4885) - Add MultiChoiceVar for custom scripts
### Bug Fixes
* [#4992](https://github.com/netbox-community/netbox/issues/4992) - Add `display_name` to nested VRF serializer
--- ---
## v2.8.9 (2020-08-04) ## v2.8.9 (2020-08-04)

View File

@ -26,7 +26,7 @@ class NestedVRFSerializer(WritableNestedSerializer):
class Meta: class Meta:
model = models.VRF model = models.VRF
fields = ['id', 'url', 'name', 'rd', 'prefix_count'] fields = ['id', 'url', 'name', 'rd', 'display_name', 'prefix_count']
# #

View File

@ -22,7 +22,7 @@ class AppTest(APITestCase):
class VRFTest(APIViewTestCases.APIViewTestCase): class VRFTest(APIViewTestCases.APIViewTestCase):
model = VRF model = VRF
brief_fields = ['id', 'name', 'prefix_count', 'rd', 'url'] brief_fields = ['display_name', 'id', 'name', 'prefix_count', 'rd', 'url']
create_data = [ create_data = [
{ {
'name': 'VRF 4', 'name': 'VRF 4',