From 304887e8f3be77db92e6a9fb72c11e8c6f1938ba Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Tue, 12 Mar 2013 22:13:17 +0100 Subject: [PATCH] Changed comlex workflow automaticly set the identifier --- openslides/motion/models.py | 9 ++++++--- openslides/motion/signals.py | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openslides/motion/models.py b/openslides/motion/models.py index d975db7c8..73d18d63c 100644 --- a/openslides/motion/models.py +++ b/openslides/motion/models.py @@ -383,7 +383,7 @@ class Motion(SlideMixin, models.Model): if type(state) is int: state = State.objects.get(pk=state) - if state.set_identifier: + if not state.dont_set_identifier: self.set_identifier() self.state = state @@ -734,8 +734,11 @@ class State(models.Model): dont_set_new_version_active = models.BooleanField(default=False) """If true, new versions are not automaticly set active.""" - set_identifier = models.BooleanField(default=False) - """If true, the motion get a identifier if the state change to this one.""" + dont_set_identifier = models.BooleanField(default=False) + """Decides if the motion gets an identifier. + + If true, the motion does not get an identifier if the state change to + this one, else it does.""" def __unicode__(self): """Returns the name of the state.""" diff --git a/openslides/motion/signals.py b/openslides/motion/signals.py index 526a56783..ff662ddf1 100644 --- a/openslides/motion/signals.py +++ b/openslides/motion/signals.py @@ -61,7 +61,8 @@ def create_builtin_workflows(sender, **kwargs): state_2_1 = State.objects.create(name=ugettext_noop('published'), workflow=workflow_2, allow_support=True, - allow_submitter_edit=True) + allow_submitter_edit=True, + dont_set_identifier=True) state_2_2 = State.objects.create(name=ugettext_noop('permitted'), workflow=workflow_2, action_word=ugettext_noop('Permit'),