reversion creates duplicate versions #1615

Closed
laurentalsina opened this Issue Jan 25, 2013 · 0 comments

1 participant

@laurentalsina

Hello
I am seeing an incorrect behaviour of reversion with django-cms, that I thought came from my code but with a fresh virtualenv on reversion 1.6.5 and django-cms 2.3.5 I still get the issue:

Page saves create not one but two versions in the reversion data of the page. The spurious version is saved immediately after the one that contains user name and change note, and has empty strings for these attributes.

Logging the code, I see that the same call to function reversion.revisions.call() triggers the two saves, the first, more correct, one on:

                    return func(*args, **kwargs)

and the second one on:

                    self.__exit__(None, None, None)

To reproduce the bug, create a new page, save it, and click on the History link you will already see two revisions instead of one.

I confirmed the issue starting from an empty django-cms on these versions:
(django-pure)[lalsina@localhost myproject]$ python --version
Python 2.7.2
(django-pure)[lalsina@localhost myproject]$ pip freeze
Django==1.4.3
South==0.7.6
django-classy-tags==0.3.4.1
django-cms==2.3.5
django-mptt==0.5.2
django-reversion==1.6.5
django-sekizai==0.6.1
html5lib==0.95
wsgiref==0.1.2

@digi604 digi604 added a commit that closed this issue Apr 5, 2013
@digi604 digi604 fixes #1615
adds a new settings and keeps the DB small for reversions
8d364b7
@digi604 digi604 closed this in 8d364b7 Apr 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment