Model.clean after errors on Model.full_clean

I’ve just come across this, as well. I only want to run my model’s clean() if clean_fields() has not resulted in any errors.

The key point of this topic is that the clean method can receive bad data, and i think that this can lead to tricky errors.

Yes, this is the crux of the issue. Here’s my situation, which is a bit more complex than just whether a requiredfield is populated or not:

I am using wagtail-color-panel to add two fields to my model that takes a color value in hex format. It does its own validation on the field that the format is correct.

In my model’s custom clean(), I want to calculate the contrast ratio between the two color fields to ensure that it meets WCAG contrast guidelines. If the value of one of the color fields isn’t in the correct format, my clean() method shouldn’t ALSO have to validate that, duplicating the field validation already provided by the wagtail-color-panel field, but as of now, I do have to.