Rename the state flag dont_set_new_version_active to leave_old_version_active.
This commit is contained in:
parent
150c4d6205
commit
7fbe609d04
2
fabfile.py
vendored
2
fabfile.py
vendored
@ -54,7 +54,7 @@ def pep8():
|
||||
|
||||
def prepare_commit():
|
||||
"""
|
||||
Does everything before a commit should be done.
|
||||
Does everything that should be done before a commit.
|
||||
|
||||
At the moment it is running the tests and check for PEP 8 errors.
|
||||
"""
|
||||
|
@ -180,7 +180,7 @@ class Motion(SlideMixin, models.Model):
|
||||
|
||||
# Set the active version of this motion. This has to be done after the
|
||||
# version is saved to the database
|
||||
if not self.state.dont_set_new_version_active or self.active_version is None:
|
||||
if self.active_version is None or not self.state.leave_old_version_active:
|
||||
self.active_version = version
|
||||
self.save()
|
||||
|
||||
@ -803,7 +803,7 @@ class State(models.Model):
|
||||
MotionDisableVersioningMixin.
|
||||
"""
|
||||
|
||||
dont_set_new_version_active = models.BooleanField(default=False)
|
||||
leave_old_version_active = models.BooleanField(default=False)
|
||||
"""If true, new versions are not automaticly set active."""
|
||||
|
||||
dont_set_identifier = models.BooleanField(default=False)
|
||||
|
@ -160,7 +160,7 @@ def create_builtin_workflows(sender, **kwargs):
|
||||
allow_create_poll=True,
|
||||
allow_submitter_edit=True,
|
||||
versioning=True,
|
||||
dont_set_new_version_active=True)
|
||||
leave_old_version_active=True)
|
||||
state_2_3 = State.objects.create(name=ugettext_noop('accepted'),
|
||||
workflow=workflow_2,
|
||||
action_word=ugettext_noop('Accept'),
|
||||
|
@ -147,7 +147,7 @@ class ModelTest(TestCase):
|
||||
motion.text = 'bar'
|
||||
first_version = motion.version
|
||||
my_state = State.objects.create(name='automatic_versioning', workflow=self.workflow,
|
||||
versioning=True, dont_set_new_version_active=True)
|
||||
versioning=True, leave_old_version_active=True)
|
||||
motion.state = my_state
|
||||
motion.save()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user