chibisov / drf-extensions

DRF-extensions is a collection of custom extensions for Django REST Framework
http://chibisov.github.io/drf-extensions/docs
MIT License
1.47k stars 208 forks source link

fix(PartialUpdateSerializerMixin): support nesting on same instance #292

Closed tuky closed 4 years ago

tuky commented 4 years ago

To fix https://github.com/chibisov/drf-extensions/issues/291.

Note that in order to have a failing test, I had to replace

saved_object = serializer.save()

with

serializer.save()
self.comment.refresh_from_db()

because the partial serializer actually puts the data into the instance, but merely does not save it due to update_fields being incomplete. So IMO we should refactor the other tests, too.

tuky commented 4 years ago

Tests are failing for Django 1.11. Should we get rid of that?

auvipy commented 4 years ago

only django 2.2+ is real