Fixes: #20123 - Add replicate_components and adopt_components write_only fields to ModuleSerializer #210

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

Originally created by @bctiemann on 3/6/2026

Fixes: #20123

Adds replicate_components and adopt_components fields to ModuleSerializer. These are write-only fields, meaning they do not appear in API GET payloads. However, they are used during create operations to create (new) or adopt (existing) components automatically, which is functionality already present in the UI.

Note that the logic is somewhat redundant with ModuleCommonForm.clean and Module.save, but the consolidation of similar pieces of code might be too intricate to be worthwhile as only small parts are truly identical.

*Originally created by @bctiemann on 3/6/2026* ### Fixes: #20123 Adds `replicate_components` and `adopt_components` fields to `ModuleSerializer`. These are write-only fields, meaning they do not appear in API GET payloads. However, they are used during create operations to create (new) or adopt (existing) components automatically, which is functionality already present in the UI. Note that the logic is somewhat redundant with `ModuleCommonForm.clean` and `Module.save`, but the consolidation of similar pieces of code might be too intricate to be worthwhile as only small parts are truly identical.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#210