-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update FEEDBACK to PENDING on Note, remove user_may_view_other_sites=…
…True
- Loading branch information
Showing
3 changed files
with
25 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 5.1 on 2024-08-15 23:56 | ||
|
||
from django.db import migrations | ||
from django.db.migrations import RunPython | ||
from edc_constants.constants import FEEDBACK, PENDING | ||
|
||
|
||
def update_status(apps, schema_editor): | ||
for model_cls in apps.get_models(): | ||
if getattr(model_cls, "status", None): | ||
print( | ||
f"Updated `{model_cls._meta.label_lower}.status` from `{FEEDBACK}` " | ||
f"to `{PENDING}`." | ||
) | ||
model_cls.objects.filter(status=FEEDBACK).update(status=PENDING) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("edc_qareports", "0016_alter_note_options_alter_qareportlog_options"), | ||
] | ||
|
||
operations = [RunPython(update_status)] |
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