This commit is contained in:
parent
867ddf7676
commit
ef00b4c020
6 changed files with 48 additions and 18 deletions
|
|
@ -5,7 +5,7 @@ from django.db import migrations
|
|||
from django.db import models
|
||||
|
||||
|
||||
def migrate_operation_name_to_list(apps, schema_editor) -> None: # noqa: ANN001, ARG001
|
||||
def migrate_operation_name_to_list(apps, schema_editor) -> None: # noqa: ANN001
|
||||
"""Convert operation_name string values to operation_names list."""
|
||||
DropCampaign = apps.get_model("twitch", "DropCampaign")
|
||||
for campaign in DropCampaign.objects.all():
|
||||
|
|
@ -14,7 +14,7 @@ def migrate_operation_name_to_list(apps, schema_editor) -> None: # noqa: ANN001
|
|||
campaign.save(update_fields=["operation_names"])
|
||||
|
||||
|
||||
def reverse_operation_names_to_string(apps, schema_editor) -> None: # noqa: ARG001, ANN001
|
||||
def reverse_operation_names_to_string(apps, schema_editor) -> None: # noqa: ANN001
|
||||
"""Convert operation_names list back to operation_name string (first item only)."""
|
||||
DropCampaign = apps.get_model("twitch", "DropCampaign")
|
||||
for campaign in DropCampaign.objects.all():
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from django.db import migrations
|
||||
|
||||
|
||||
def mark_all_drops_fully_imported(apps, schema_editor) -> None: # noqa: ANN001, ARG001
|
||||
def mark_all_drops_fully_imported(apps, schema_editor) -> None: # noqa: ANN001
|
||||
"""Marks all existing DropCampaigns as fully imported.
|
||||
|
||||
This was needed to ensure that the Twitch API view only returns campaigns that are ready for display.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue