Skip to content

Conversation

@bctiemann
Copy link
Contributor

Fixes: #266

Implements create() and update() methods for the synthetic serializer class created by get_serializer_class. This avoids the guard in stock DRF that prevents nested serializers from being automatically generated for M2M fields, and allows the API to be used to create and update Custom Objects with multi-object fields whose values are specified in the payload.

POST: http://127.0.0.1:8000/api/plugins/custom-objects/foo1s/

{
    "foo2s": [1, 2],
    "foo2": 1
}

@bctiemann bctiemann requested a review from arthanson November 14, 2025 19:13
Copy link
Contributor

@arthanson arthanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some tests for these, we should probably start doing that for any new additions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating/editing Custom Object via API with field type Multiple Object fails

3 participants