[Pulp-dev] 3.0 Validation update

Jeff Ortel jortel at redhat.com
Tue Apr 18 18:21:49 UTC 2017


After reading the thread, it's still unclear to me whether consensus was reached and if so, what decisions
were made for either:

1. Where validation is performed.
2. Are updates/deletes tasks?

Can you post a follow up with this?



On 04/06/2017 05:40 PM, Austin Macdonald wrote:
> tldr;
>     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 expected.
> The serializer formatted the REST data and then validated the data against its own expectations. Of course it
> thought it was right! 
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 847 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20170418/ce07ad47/attachment.sig>

More information about the Pulp-dev mailing list