OpenSlides/server/openslides/motions/migrations/0037_motionvote_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
801 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),
("motions", "0036_rename_verbose_poll_types"),
]
operations = [
migrations.AddField(
model_name="motionvote",
name="delegated_user",
field=models.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=openslides.utils.models.SET_NULL_AND_AUTOUPDATE,
related_name="motionvote_delegated_votes",
to=settings.AUTH_USER_MODEL,
),
),
]