OpenSlides/server/openslides/assignments/migrations/0015_assignmentvote_delegated_user.py
Joshua Sangmeister 3ac8569712
Add vote delegation on server side
Add user_has_voted_for_delegations. Add tests

Prevent self delegation

Make delegated_user visible
2020-09-30 14:05:22 +02:00

30 lines
812 B
Python

# Generated by Django 2.2.16 on 2020-09-10 11:02
from django.conf import settings
from django.db import migrations, models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("assignments", "0014_remove_deprecated_slides"),
]
operations = [
migrations.AddField(
model_name="assignmentvote",
name="delegated_user",
field=models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=openslides.utils.models.SET_NULL_AND_AUTOUPDATE,
related_name="assignmentvote_delegated_votes",
to=settings.AUTH_USER_MODEL,
),
),
]