def has_conflict(self):
return (Promotions.objects.filter(
applicable_products__in=self.applicable_products.all(),
priority=self.priority,).exclude(promotion_id=self.promotion_id).
filter(models.Q(
start_date__lte=self.end_date),
end_date__gte = self.start_date).
exists())