-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #636 from LibraryOfCongress/status-refactor
Status refactor
- Loading branch information
Showing
12 changed files
with
97 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 2.0.9 on 2018-11-15 19:11 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("concordia", "0013_auto_20181031_1305")] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="asset", | ||
name="transcription_status", | ||
field=models.CharField( | ||
choices=[ | ||
("not_started", "Not Started"), | ||
("in_progress", "In Progress"), | ||
("submitted", "Submitted for Review"), | ||
("completed", "Completed"), | ||
], | ||
default="not_started", | ||
editable=False, | ||
max_length=20, | ||
), | ||
) | ||
] |
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 2.0.9 on 2018-11-15 19:36 | ||
|
||
from django.db import migrations | ||
from concordia.models import TranscriptionStatus | ||
|
||
|
||
def split_edit_statuses(apps, schema_editor): | ||
Transcription = apps.get_model("concordia", "Transcription") | ||
Asset = apps.get_model("concordia", "Asset") | ||
|
||
Asset.objects.filter( | ||
pk__in=Transcription.objects.values("asset_id"), transcription_status="edit" | ||
).update(transcription_status=TranscriptionStatus.IN_PROGRESS) | ||
Asset.objects.filter(transcription_status="edit").update( | ||
transcription_status=TranscriptionStatus.NOT_STARTED | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("concordia", "0014_auto_20181115_1411")] | ||
|
||
operations = [migrations.RunPython(split_edit_statuses)] |
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
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
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
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