Re: multiple constraints not working in the db

2020-04-03 Thread mccc
oh, forgot: versions are Python 3.7.6 and Django 2.2.11 On Friday, April 3, 2020 at 7:46:40 PM UTC+2, mccc wrote: > > Hello, > > I'm having issues getting multiple constraints to work (in postgres, if it > matters). > Here is the Meta: > > > class Meta: > constraints = [ > CheckConst

multiple constraints not working in the db

2020-04-03 Thread mccc
Hello, I'm having issues getting multiple constraints to work (in postgres, if it matters). Here is the Meta: class Meta: constraints = [ CheckConstraint( check=(Q(target_value__gt=0) & ~Q(target_metric=DEFAULT)) | (Q(enabled=False) |