Closes #21263: Prefetch related objects after creating/updating objects via REST API #441

Closed
opened 2026-04-05 16:32:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 1/30/2026

Closes: #21263

Extend the create(), update(), and bulk_update() methods on NetBoxModelViewSet to replace the original request data with a queryset. This ensures that all related objects are prefetched efficiently. It also ensures that the response data accurately reflects the state of the data as written.

(Note: There is no bulk_create() method; create() handles both individual and bulk writes.)

*Originally created by @jeremystretch on 1/30/2026* ### Closes: #21263 Extend the `create()`, `update()`, and `bulk_update()` methods on NetBoxModelViewSet to replace the original request data with a queryset. This ensures that all related objects are prefetched efficiently. It also ensures that the response data accurately reflects the state of the data as written. (Note: There is no `bulk_create()` method; `create()` handles both individual and bulk writes.)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#441