Fix invalid use of F() when creating user story
parent
c89c6e7c31
commit
7ab671fea7
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue