Hello,
All my models inherit from an abstract parent model which have a save method that looks like this
def save(self, *args, **kwargs):
with transaction.atomic(), reversion.create_revision():
return super(LogItModel, self).save(*args, **kwargs)
I want to write the reversion object to a log as it's created within the with statement. Is there a way to access the reversion object created with reversion.create_revision()?
I tried doing
with transaction.atomic(), reversion.create_revision() as version:
print(version)
but it is printing None.
Thanks!