Re: Using unique_together with foreign key fields which may be None

2013-09-30 Thread Berndt Jung
, 2013 1:55:11 PM UTC-7, Berndt Jung wrote: > > Hi, > > I'm having trouble using the unique together constraint with a a field > which may be None. Given this model: > > class Rule(models.Model): > > internal = models.BooleanField(default=Fal

Using unique_together with foreign key fields which may be None

2013-09-30 Thread Berndt Jung
Hi, I'm having trouble using the unique together constraint with a a field which may be None. Given this model: class Rule(models.Model): internal = models.BooleanField(default=False) port_range_from = models.PositiveIntegerField(null=True, blank=True) port_range_to =