Closes: #20930 - Add an ASNSiteSerializer to allow serialization of Site in ASNSerializer #725

Closed
opened 2026-04-05 17:18:57 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @bctiemann on 12/16/2025

Closes: #20930

Normally, via the UI, it is possible to set the list of associated sites when creating an ASN. This is not possible currently in the API because ASNSerializer omits a sites field because of a circular import issue.

This PR resolves the circular import by creating a minimal ASNSiteSerializer for use in ASNSerializer, allowing a POST payload such as:

{
    "asn": 65007,
    "rir": 8,
    "sites": [24]
}
*Originally created by @bctiemann on 12/16/2025* ### Closes: #20930 Normally, via the UI, it is possible to set the list of associated sites when creating an ASN. This is not possible currently in the API because `ASNSerializer` omits a `sites` field because of a circular import issue. This PR resolves the circular import by creating a minimal `ASNSiteSerializer` for use in `ASNSerializer`, allowing a POST payload such as: ``` { "asn": 65007, "rir": 8, "sites": [24] } ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#725