Hi there!

I'm working on an application that needs to do lots of cross checking. We 
also support partial updates, son on every save I usually end up doing 
something like:

if 'validate_field' in self.validated_data:
  validation_value = self.validated_data['validate_field']
else:
  validation_value = self.instance.validate_field
# .. Validation logic here

I keep asking myself:
* Is this a valid approach? As in, will it bite me later?
* Is there a better way to do it?

Thank you,

Juan

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to