From 37e61071bfcaf1108c01ffa3d4b92fc599ee2e20 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 17 Jun 2014 15:35:00 +0200 Subject: [PATCH] Updating current version in presave instead of doing it in the post_save method --- taiga/projects/occ/mixins.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/taiga/projects/occ/mixins.py b/taiga/projects/occ/mixins.py index 44aac7e7..6c254c92 100644 --- a/taiga/projects/occ/mixins.py +++ b/taiga/projects/occ/mixins.py @@ -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):