do not create a new aversion, if only the permission has changed
This commit is contained in:
parent
da14eca296
commit
8089c3c8a9
@ -67,7 +67,7 @@ class Application(models.Model):
|
|||||||
accept a Version
|
accept a Version
|
||||||
"""
|
"""
|
||||||
self.permitted = version
|
self.permitted = version
|
||||||
self.save()
|
self.save(nonewversion=True)
|
||||||
version.rejected = False
|
version.rejected = False
|
||||||
version.save()
|
version.save()
|
||||||
|
|
||||||
@ -132,11 +132,13 @@ class Application(models.Model):
|
|||||||
min_supporters = int(config_get('application_min_supporters'))
|
min_supporters = int(config_get('application_min_supporters'))
|
||||||
return self.supporter.count() >= min_supporters
|
return self.supporter.count() >= min_supporters
|
||||||
|
|
||||||
def save(self, user=None):
|
def save(self, user=None, nonewversion=False):
|
||||||
"""
|
"""
|
||||||
Save the Application, and create a new AVersion if necessary
|
Save the Application, and create a new AVersion if necessary
|
||||||
"""
|
"""
|
||||||
super(Application, self).save()
|
super(Application, self).save()
|
||||||
|
if nonewversion:
|
||||||
|
return
|
||||||
last_version = self.last_version
|
last_version = self.last_version
|
||||||
if last_version is not None:
|
if last_version is not None:
|
||||||
if (last_version.text == self.text
|
if (last_version.text == self.text
|
||||||
|
Loading…
Reference in New Issue
Block a user