OpenSlides/server/openslides/assignments/migrations/0025_assignmentpoll_fix_vote_values.py
Joshua Sangmeister ee31c1e633 Lock poll to prevent race conditions
Add migrations
2021-04-15 15:19:30 +02:00

23 lines
574 B
Python

# Generated by jsangmeister on 2021-04-15 08:01
from django.db import migrations
from ...poll.migrations.poll_migration_helper import fix_wrongly_calculated_vote_fields
class Migration(migrations.Migration):
dependencies = [
("assignments", "0024_assignmentpoll_entitled_users_remove_duplicates"),
]
operations = [
migrations.RunPython(
fix_wrongly_calculated_vote_fields(
"assignments",
"AssignmentPoll",
lambda poll: not poll.is_pseudoanonymized,
)
),
]