Introduce a serializer field for GenericForeignKeys #17936
Labels
status: backlog
Awaiting selection for work
type: housekeeping
Changes to the application which do not directly impact the end user
Proposed Changes
Devise and implement a custom serializer field to represent GenericForeignKeys on models. This is currently handled using a read-only
SerializerMethodField
, which requires a boilerplate method be included on the serializer class. For instance, the code below is from the serializer for circuit terminations:Justification
Introducing a custom field to represent GFK relationships allows us to enforce a standard implementation and reduce boilerplate.
The text was updated successfully, but these errors were encountered: