24 lines
668 B
Python
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)
|