etianen/django-reversion — Issue #91: get_for_object doesn't return the latest saved instance, but the previous one
Author: gdebure
Created: 2011-10-17 11:35:51+00:00
State: open

I'm trying to implement email notification when saving an object. The notification should contain, for each field that was changed, the old value and the new value. I'm using the django built-in post_save signaln and proceed like this in the receiver:

instance_versions = reversion.get_for_object(instance)
old_version = instance_versions[1]
new_version = instance_versions[0]

however, when accessing new_version attributes, I notice that they do not contain the latest values, but the n-1 values... old_version contain the n-2 values.

Am I doing something wrong, or is this a bug ?