Closed erickguan closed 1 year ago
That indeed looks a like bug, but I'll have to think a bit about how this can best be fixed. Having validated_data
be a dataclass instance instead of a dict isn't something DRF likes.
For now you can workaround it by accessing validated_data
instead of calling save()
:
users = serializer.validated_data
Okay, thanks. I can confirm the workaround (validated_data
) works well.
Hello, I am working on deserializing Jira user lists. The gist of the code looks like this:
The last save raises.
attrs
in the Django Rest Framework is a dataclass so it is not possible to unwrap it.The dependency versions: django==3.2.12 djangorestframework==3.12.4 djangorestframework-dataclasses==1.2.0
How can I help?