mirror of
https://github.com/ae-utbm/sith.git
synced 2025-08-29 12:15:44 +00:00
replace deprecated CheckConstraint.check by CheckConstraint.condition
This commit is contained in:
@@ -154,7 +154,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AddConstraint(
|
||||
model_name="userban",
|
||||
constraint=models.CheckConstraint(
|
||||
check=models.Q(("expires_at__gte", models.F("created_at"))),
|
||||
condition=models.Q(("expires_at__gte", models.F("created_at"))),
|
||||
name="user_ban_end_after_start",
|
||||
),
|
||||
),
|
||||
|
@@ -745,7 +745,7 @@ class UserBan(models.Model):
|
||||
fields=["ban_group", "user"], name="unique_ban_type_per_user"
|
||||
),
|
||||
models.CheckConstraint(
|
||||
check=Q(expires_at__gte=F("created_at")),
|
||||
condition=Q(expires_at__gte=F("created_at")),
|
||||
name="user_ban_end_after_start",
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user