[Answer]-Django Rest Framework PrimaryKeyRelatedField clearing if not set

1👍

DRF’s default behavior for updating models to update all fields on PUT and only the provided fields on PATCH (see UpdateModelMixin when you use ModelViewSet)is on PUT to update the complete object. If you want a partial update, use PATCH with only the fields you want to update.

Leave a comment