diff --git a/terraso_backend/apps/project_management/migrations/0003_remove_site_project_management_site_unique_active_slug_and_more.py b/terraso_backend/apps/project_management/migrations/0003_remove_site_project_management_site_unique_active_slug_and_more.py index 562750ba5..eeedabc22 100644 --- a/terraso_backend/apps/project_management/migrations/0003_remove_site_project_management_site_unique_active_slug_and_more.py +++ b/terraso_backend/apps/project_management/migrations/0003_remove_site_project_management_site_unique_active_slug_and_more.py @@ -49,7 +49,7 @@ class Migration(migrations.Migration): migrations.AddConstraint( model_name="site", constraint=models.CheckConstraint( - check=models.Q( + condition=models.Q( models.Q(("project__isnull", False), ("owner__isnull", False), _connector="OR"), models.Q(("project__isnull", True), ("owner__isnull", True), _connector="OR"), ), diff --git a/terraso_backend/apps/soil_id/migrations/0003_alter_depthdependentsoildata_options_and_more.py b/terraso_backend/apps/soil_id/migrations/0003_alter_depthdependentsoildata_options_and_more.py index 26da98af1..f6d1cd923 100644 --- a/terraso_backend/apps/soil_id/migrations/0003_alter_depthdependentsoildata_options_and_more.py +++ b/terraso_backend/apps/soil_id/migrations/0003_alter_depthdependentsoildata_options_and_more.py @@ -499,7 +499,7 @@ class Migration(migrations.Migration): migrations.AddConstraint( model_name="depthdependentsoildata", constraint=models.CheckConstraint( - check=models.Q(("depth_start__lt", models.F("depth_end"))), + condition=models.Q(("depth_start__lt", models.F("depth_end"))), name="depth_interval_coherence", ), ), diff --git a/terraso_backend/apps/soil_id/migrations/0005_projectdepthinterval_projectsoilsettings_and_more.py b/terraso_backend/apps/soil_id/migrations/0005_projectdepthinterval_projectsoilsettings_and_more.py index 54fb39744..88ad8eba9 100644 --- a/terraso_backend/apps/soil_id/migrations/0005_projectdepthinterval_projectsoilsettings_and_more.py +++ b/terraso_backend/apps/soil_id/migrations/0005_projectdepthinterval_projectsoilsettings_and_more.py @@ -205,7 +205,7 @@ class Migration(migrations.Migration): migrations.AddConstraint( model_name="depthdependentsoildata", constraint=models.CheckConstraint( - check=models.Q(("depth_interval_start__lt", models.F("depth_interval_end"))), + condition=models.Q(("depth_interval_start__lt", models.F("depth_interval_end"))), name="soil_id_depthdependentsoildata_depth_interval_coherence", ), ), @@ -247,7 +247,7 @@ class Migration(migrations.Migration): migrations.AddConstraint( model_name="soildatadepthinterval", constraint=models.CheckConstraint( - check=models.Q(("depth_interval_start__lt", models.F("depth_interval_end"))), + condition=models.Q(("depth_interval_start__lt", models.F("depth_interval_end"))), name="soil_id_soildatadepthinterval_depth_interval_coherence", ), ), @@ -262,7 +262,7 @@ class Migration(migrations.Migration): migrations.AddConstraint( model_name="projectdepthinterval", constraint=models.CheckConstraint( - check=models.Q(("depth_interval_start__lt", models.F("depth_interval_end"))), + condition=models.Q(("depth_interval_start__lt", models.F("depth_interval_end"))), name="soil_id_projectdepthinterval_depth_interval_coherence", ), ), diff --git a/terraso_backend/apps/soil_id/models/depth_interval.py b/terraso_backend/apps/soil_id/models/depth_interval.py index 4da89d75a..5950dd349 100644 --- a/terraso_backend/apps/soil_id/models/depth_interval.py +++ b/terraso_backend/apps/soil_id/models/depth_interval.py @@ -38,7 +38,7 @@ def constraints(related_field: str): name="%(app_label)s_%(class)s_unique_depth_interval", ), models.CheckConstraint( - check=models.Q(depth_interval_start__lt=models.F("depth_interval_end")), + condition=models.Q(depth_interval_start__lt=models.F("depth_interval_end")), name="%(app_label)s_%(class)s_depth_interval_coherence", ), ] diff --git a/terraso_backend/config/settings.py b/terraso_backend/config/settings.py index d42aa0d4e..774e10cdf 100644 --- a/terraso_backend/config/settings.py +++ b/terraso_backend/config/settings.py @@ -445,3 +445,6 @@ class JWTProvider(TypedDict): f"https://api.hsforms.com/submissions/v3/integration/submit/" f"{HUBSPOT_PORTAL_ID}/{HUBSPOT_ACCOUNT_DELETION_FORM_ID}" ) + +# Neeed for Django 5.x to silence warning. Remove when Django 6.0 is released. +FORMS_URLFIELD_ASSUME_HTTPS = True