Updating current version in presave instead of doing it in the post_save method

remotes/origin/enhancement/email-actions
Alejandro Alonso 2014-06-17 15:35:00 +02:00
parent e534920c01
commit 37e61071bf
1 changed files with 1 additions and 5 deletions

View File

@ -31,12 +31,8 @@ class OCCResourceMixin(object):
if current_version != param_version:
raise exc.WrongArguments({"version": "The version doesn't match with the current one"})
super().pre_save(obj)
def post_save(self, obj, created=False):
obj.version += 1
obj.save()
super().post_save(obj, created)
super().pre_save(obj)
class OCCModelMixin(models.Model):