mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 14:19:35 +00:00
replace deprecated CheckConstraint.check by CheckConstraint.condition
This commit is contained in:
1 parent
23103950b8
commit
e864e82573
8 files changed
+8
-8
No files matched your search
@@ -29,7 +29,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AddConstraint(
|
||||
model_name="membership",
|
||||
constraint=models.CheckConstraint(
|
||||
check=models.Q(("end_date__gte", models.F("start_date"))),
|
||||
condition=models.Q(("end_date__gte", models.F("start_date"))),
|
||||
name="end_after_start",
|
||||
),
|
||||
),
|
||||
|
||||
+1
-1
@@ -347,7 +347,7 @@ class Membership(models.Model):
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.CheckConstraint(
|
||||
check=Q(end_date__gte=F("start_date")), name="end_after_start"
|
||||
condition=Q(end_date__gte=F("start_date")), name="end_after_start"
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user