Skip to content

Commit

Permalink
Iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Feb 27, 2024
1 parent 30cb093 commit 958d1fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game/migrations/0090_add_missing_model_solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_missing_model_solutions(apps: Apps, *args):

for level_name, model_solution in model_solutions.items():
count = Level.objects.filter(name=level_name).update(
model_solution=model_solution
model_solution=model_solution, disable_algorithm_score=False
)
assert count == 1

Expand All @@ -46,9 +46,9 @@ def add_missing_model_solutions(apps: Apps, *args):
"91",
],
score=10,
)
).prefetch_related("level")

for attempt in attempts:
for attempt in attempts.iterator(chunk_size=500):
workspace = attempt.workspace

Check warning on line 52 in game/migrations/0090_add_missing_model_solutions.py

View check run for this annotation

Codecov / codecov/patch

game/migrations/0090_add_missing_model_solutions.py#L52

Added line #L52 was not covered by tests

# Get number of blocks from solution - 1 to discount Start block
Expand Down

0 comments on commit 958d1fa

Please sign in to comment.