etianen/django-reversion — Issue #117: New FK instance added to all revisions?
Author: benrxv
Created: 2011-12-13 01:06:50+00:00
State: open

I have a model, Rx with a FK relationship to another model, Entry. In admin Rx is setup as an inline for Entry. When a new Rx instance is added, that instance is added to every revision in that Entry's history, not just the most recent. I am using admin to register the models, and middleware to create revisions. Is this normal behavior?

models.py

class Entry(models.Model):
...

class Rx(models.Model):
entry = models.ForeignKey(Entry)
...

admin.py

class RxInline(admin.TabularInline):
model = Rx

class EntryAdmin(reversion.VersionAdmin):
inlines = [RxInline]