Skip to content

Commit

Permalink
fix: Update Python Den level 15 model solution (#1736)
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 authored Oct 2, 2024
1 parent 2945f51 commit 59fa7c1
Showing 1 changed file 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_reoder_episodes_13_14")]
operations = [
migrations.RunPython(
update_level_model_solution,
reverse_code=revert_level_model_solution,
)
]

0 comments on commit 59fa7c1

Please sign in to comment.