Skip to content
Snippets Groups Projects
Commit be24b08e authored by Tore.Brede's avatar Tore.Brede
Browse files

Updating constraint to person-role-unit

parent 3d99c811
No related branches found
No related tags found
1 merge request!2GREG-4: Simple admin interface
# Generated by Django 3.2.5 on 2021-07-13 06:47
# Generated by Django 3.2.5 on 2021-07-13 13:44
import datetime
import dirtyfields.dirtyfields
......@@ -200,7 +200,7 @@ class Migration(migrations.Migration):
),
migrations.AddConstraint(
model_name='personrole',
constraint=models.UniqueConstraint(fields=('person', 'role'), name='personrole_person_role_unique'),
constraint=models.UniqueConstraint(fields=('person', 'role', 'unit'), name='personrole_person_role_unit_unique'),
),
migrations.AddConstraint(
model_name='personconsent',
......
......@@ -106,7 +106,7 @@ class PersonRole(BaseModel):
class Meta:
constraints = [
models.UniqueConstraint(
fields=["person", "role"], name="personrole_person_role_unique"
fields=["person", "role", "unit"], name="personrole_person_role_unit_unique"
)
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment