I have following unique constraint in my model.
class Meta:
unique_together = (('crop', 'order', 'sku'),)
But sku may be null in some cases and in that case this unique_together is not working as null is not equal to null.i am thinking to make a conditional unique_together like if sku is not null then (('crop', 'order', 'sku'),) else (('crop', 'order'),).