Files
vrobbler/vrobbler/apps/scrobbles/management/commands/convert_task_log_data.py
Colin Powell 009b2ba243
Some checks failed
build & deploy / build-and-deploy (push) Has been cancelled
build & deploy / test (push) Has been cancelled
[scrobbles] Big update for notes in tasks and boardgames
2026-05-31 23:17:16 -04:00

24 lines
668 B
Python

from django.core.management.base import BaseCommand
from vrobbler.apps.tasks.utils import (
convert_old_boardgame_log_to_new,
convert_tasks_notes_list_to_dict,
)
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
"--commit",
action="store_true",
help="Commit changes",
)
def handle(self, *args, **options):
commit = False
if options["commit"]:
commit = True
else:
print("No changes will be saved, use --commit to save")
convert_tasks_notes_list_to_dict(commit)
convert_old_boardgame_log_to_new(commit)