[Pulp-dev] 3.0 Validation update

Austin Macdonald austin at redhat.com
Thu Apr 6 22:40:49 UTC 2017

    1. Serializer errors won't be caught by serializer validation.
    2. DRF does not use full_clean(), so if data passes serializer
validation, it gets into the db.
    3. We can use full_clean for process level validation.

During a lengthy discussion on IRC, I incorrectly asserted that full_clean
did not work with DRF.

My thinking was partly based on the incorrect assumption that the data was
valid. This seemed reasonable given that I created the data from the REST
API, so the data was validated by the serializers. After a closer look, I
fixed an issue with the serializer and was able to use full_clean() as

The serializer formatted the REST data and then validated the data against
its own expectations. Of course it thought it was right!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20170406/b9d4aa2a/attachment.htm>

More information about the Pulp-dev mailing list