django-pghistory
django-pghistory copied to clipboard
Use concrete models when filtering event models by proxy models
When core.event_models
function filters event models by proxy references_model
or tracks_model
, it should use the concrete model for filtering.
It will allow showing correct results in the Events admin when checking events for ProxyModel
in this example:
@pghistory.track()
class BaseModel(models.Model):
...
class ProxyModel(models.Model):
...
class Meta:
proxy = True
N.B.: Filtering by obj
works correctly because _filter_event_models
uses obj.__class__
for that.
Type: bug