-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Django FSM migration to Viewflow (#4296)
* Django FSM migration to Viewflow - Added new `django-viewflow` and `django-filter` dependencies to `requirements.txt`. - New file `viewflow.py` under `/audit/models/` which contains the FSM logic for transitioning an SAC. - Moved `STATUS` enumeration outside of the `SingleAuditChecklist` class. This required import/reference changes across many files and tests. - Removed references of old deprecated library `django-fsm`. - New migration to handle the changing the SAC's `submission_name` field to remove dependency on the deprecated `django-fsm`. * Git conflicts with #4292
- Loading branch information
Showing
19 changed files
with
767 additions
and
649 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
47 changes: 47 additions & 0 deletions
47
backend/audit/migrations/0013_singleauditchecklistflow_and_more.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,47 @@ | ||
# Generated by Django 5.1 on 2024-09-18 18:44 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("audit", "0012_alter_sacvalidationwaiver_waiver_types"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="SingleAuditChecklistFlow", | ||
fields=[ | ||
( | ||
"singleauditchecklist_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="audit.singleauditchecklist", | ||
), | ||
), | ||
], | ||
bases=("audit.singleauditchecklist",), | ||
), | ||
migrations.AlterField( | ||
model_name="singleauditchecklist", | ||
name="submission_status", | ||
field=models.CharField( | ||
choices=[ | ||
("in_progress", "In Progress"), | ||
("ready_for_certification", "Ready for Certification"), | ||
("auditor_certified", "Auditor Certified"), | ||
("auditee_certified", "Auditee Certified"), | ||
("certified", "Certified"), | ||
("submitted", "Submitted"), | ||
("disseminated", "Disseminated"), | ||
], | ||
default="in_progress", | ||
), | ||
), | ||
] |
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
Oops, something went wrong.