Skip to content

Commit

Permalink
fix: change check= to condition= for Django 6 compatibility (#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber authored Sep 10, 2024
1 parent 25d3544 commit 9d7f39f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraso_backend/apps/project_management/models/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Meta(BaseModel.Meta):
abstract = False
constraints = [
models.CheckConstraint(
check=(models.Q(project__isnull=False) | models.Q(owner__isnull=False))
condition=(models.Q(project__isnull=False) | models.Q(owner__isnull=False))
& (models.Q(project__isnull=True) | models.Q(owner__isnull=True)),
name="site_must_be_owned_once",
)
Expand Down

0 comments on commit 9d7f39f

Please sign in to comment.