10👍
✅
It’s not a one-liner but short enough (extracted from the drf sources):
def update(self, instance, validated_data):
for attr, value in validated_data.items():
setattr(instance, attr, value)
instance.save()
return instance
Source:stackexchange.com