Fix invalid use of F() when creating user story

remotes/origin/enhancement/email-actions
Anler Hp 2014-06-23 12:11:02 +02:00
parent c89c6e7c31
commit 7ab671fea7
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ class OCCResourceMixin(object):
if current_version != param_version:
raise exc.WrongArguments({"version": "The version doesn't match with the current one"})
obj.version = models.F('version') + 1
if obj.id:
obj.version = models.F('version') + 1
super().pre_save(obj)