diff --git a/CHANGELOG.rst b/CHANGELOG.rst index db8756bf4c704e9c327280fc27abf4026a433580..a9cd5df661af38ca96b0e65b49889db1931b2bc8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog`_, and this project adheres to `Semantic Versioning`_. +`2.0rc2`_ - 2021-06-26 +---------------------- + +Fixed +~~~~~ + +* Migration for uniqueness per site was broken due to wrong syntax. + `2.0rc1`_ - 2021-06-23 ---------------------- @@ -66,3 +74,4 @@ Added .. _2.0b0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0b0 .. _2.0b1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0b1 .. _2.0rc1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0rc1 +.. _2.0rc2: https://edugit.org/AlekSIS/Official/AlekSIS-App-Hjelp/-/tags/2.0rc2 diff --git a/aleksis/apps/hjelp/migrations/0004_unique_constraints.py b/aleksis/apps/hjelp/migrations/0004_unique_constraints.py index 9d57f65f5941f8fa3222c61c3bf8297729b5f0b9..ea37d99ea482f105ea8224a49760059ee64ebdbf 100644 --- a/aleksis/apps/hjelp/migrations/0004_unique_constraints.py +++ b/aleksis/apps/hjelp/migrations/0004_unique_constraints.py @@ -44,7 +44,7 @@ class Migration(migrations.Migration): ), migrations.AddConstraint( model_name='issuecategory', - constraint=models.UniqueConstraint(fields=('site_id', 'name'), condition=models.Q(parent='null'), name='unique_category_name_per_site_without_parent'), + constraint=models.UniqueConstraint(fields=('site_id', 'name'), condition=models.Q(parent=None), name='unique_category_name_per_site_without_parent'), ), migrations.AddConstraint( model_name='issuecategory', diff --git a/aleksis/apps/hjelp/models.py b/aleksis/apps/hjelp/models.py index c7c3f778cb5de433ca4c895b457bd2ef19cdef78..cac958766d5314f5493b1a8645e368a0cdbe8a1d 100644 --- a/aleksis/apps/hjelp/models.py +++ b/aleksis/apps/hjelp/models.py @@ -103,7 +103,7 @@ class IssueCategory(ExtensibleModel): constraints = [ models.UniqueConstraint( fields=["site_id", "name"], - condition=models.Q(parent="null"), + condition=models.Q(parent=None), name="unique_category_name_per_site_without_parent", ), models.UniqueConstraint( diff --git a/pyproject.toml b/pyproject.toml index ae40841b5aab90bc841a34a64d965faf330a8ea8..36e3279e5df5705eb88423fb441e120a6ef63a9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "AlekSIS-App-Hjelp" -version = "2.0rc1" +version = "2.0rc2" packages = [ { include = "aleksis" } ]