Skip to content

Commit

Permalink
fix: Update Python Den level 15 model solution
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Sep 30, 2024
1 parent 2945f51 commit 88af21d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions game/migrations/0103_level_1015_solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from django.apps.registry import Apps
from django.db import migrations


def update_level_model_solution(apps: Apps, *args):
Level = apps.get_model("game", "Level")
level43 = Level.objects.get(name="1015", default=True)
level43.model_solution = "[11,12]"
level43.save()


def revert_level_model_solution(apps: Apps, *args):
Level = apps.get_model("game", "Level")
level43 = Level.objects.get(name="1015", default=True)
level43.model_solution = "[11]"
level43.save()


class Migration(migrations.Migration):
dependencies = [("game", "0102_reorder_episodes_13_14")]
operations = [
migrations.RunPython(
update_level_model_solution,
reverse_code=revert_level_model_solution,
)
]

0 comments on commit 88af21d

Please sign in to comment.