Inconsistent display of IP family on aggregate API serializer #3163

Closed
opened 2025-12-29 18:26:15 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Jan 15, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.12

Steps to Reproduce

  1. Request a prefix object via the REST API
  2. Request an aggregate object via the REST API

Expected Behavior

The family field for both objects should have the same format.

Observed Behavior

The prefix serializer renders family using a choice dictionary:

    "family": {
        "value": 4,
        "label": "IPv4"
    },

However, the aggregate serializer does not:

    "family": 4,

AggregateSerializer should be corrected to display the IP address family in the same manner as the prefix and IP address serializers.

Originally created by @jeremystretch on GitHub (Jan 15, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.6.8 * NetBox version: 2.6.12 ### Steps to Reproduce 1. Request a prefix object via the REST API 2. Request an aggregate object via the REST API ### Expected Behavior The `family` field for both objects should have the same format. ### Observed Behavior The prefix serializer renders `family` using a choice dictionary: ``` "family": { "value": 4, "label": "IPv4" }, ``` However, the aggregate serializer does not: ``` "family": 4, ``` `AggregateSerializer` should be corrected to display the IP address family in the same manner as the prefix and IP address serializers.
adam added the type: bugstatus: accepted labels 2025-12-29 18:26:15 +01:00
adam closed this issue 2025-12-29 18:26:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3163