-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fixtures/django/14_prescribers.json): re-type accepted orgs typed…
… Other refactor(admin): authorization_status is a more reliable field feat(PrescriberOrganization): CheckConstraint for restricting Other orgs validation fix: invalidated tests wording changes wording change
- Loading branch information
1 parent
8fc1719
commit 6ed7e17
Showing
7 changed files
with
89 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ribers/migrations/0006_prescriberorganization_prevent_validated_authorization_if_other.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 5.0.9 on 2024-09-26 09:53 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("cities", "0001_initial"), | ||
("prescribers", "0005_alter_prescribermembership_updated_by_and_more"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddConstraint( | ||
model_name="prescriberorganization", | ||
constraint=models.CheckConstraint( | ||
check=models.Q(("authorization_status", "VALIDATED"), ("kind", "Autre"), _negated=True), | ||
name="prevent_validated_authorization_if_other", | ||
violation_error_message='Une organisation habilitée ne peut pas être de type "Autre".', | ||
), | ||
), | ||
] |
Oops, something went wrong.