From 4339c3ae8a331fef8d79259cf0060a8f647456f3 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sun, 24 Jun 2012 22:34:11 +0200 Subject: [PATCH] allow to save an empty poll --- openslides/poll/forms.py | 1 + openslides/poll/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openslides/poll/forms.py b/openslides/poll/forms.py index c1ff44422..62e7541ba 100644 --- a/openslides/poll/forms.py +++ b/openslides/poll/forms.py @@ -32,4 +32,5 @@ class OptionForm(forms.Form, CssClassMixin): label=value, initial=weight, min_value=-2, + required=False, ) diff --git a/openslides/poll/models.py b/openslides/poll/models.py index f9ba6e23f..a01715e5b 100644 --- a/openslides/poll/models.py +++ b/openslides/poll/models.py @@ -33,7 +33,7 @@ class TextOption(BaseOption): class Vote(models.Model): option = models.ForeignKey(BaseOption) #profile = models.ForeignKey(Profile) # TODO: we need a person+ here - weight = models.IntegerField(default=1) + weight = models.IntegerField(default=1, null=True) value = models.CharField(max_length=255, null=True) def get_weight(self, raw=False):