I'm trying to write a Q object that says
Either one of these 4 fields is not null, or this field is not true
I have a normalized table with 4 category of prices, and an available flag
price_A
price_B
price_C
price_D
available_on_the_store
I want at least one of these prices to be populated before it is possible to mark it as available_on_the_store on a CheckConstraint with a Q object
I can easily do this with a huge Q chain or can easily write it in .clean() and force it in the python side, yet I want it to be in the database level; so please answer accordingly.