Hello everyone.
How do we use update_fields in Viewsets and Mixins?
On using partial_update in UpdateModelMixin.
model.save() method is trying to run update query on all the model fields instead of updating only changed fields, which is throwing this error →
message: "update or delete on table “users” violates foreign key constraint “coupons_user_code_fkey” on table “coupons”\nDETAIL: Key (code)=(xyz) is still referenced from table “coupons”.\n"