Updating related models in a PUT
It seems the serializer.update
is designed to update related models (https://git.happy-dev.fr/startinblox/djangoldp-packages/djangoldp/blob/master/djangoldp/serializers.py#L569) by receiving them in the request as a dictionary
Django REST seems to prevent this from working, as return serializer_class(*args, **kwargs)
transforms the dictionary in context to a resolved model: https://git.happy-dev.fr/startinblox/djangoldp-packages/djangoldp/blob/master/djangoldp/views.py#L181
e.g. on PUT project I before this line the context is:
{ ..., 'customer': {'address': 'Europe', ...}, ... }
after this line the context is:
{ ..., 'customer': <Customer: Happy Tech Global>, ... }
As such I believe this code needs to be refactored?