From 125ffbbd23edbe1a555b1e7a8b08bf9a59307d20 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 24 Apr 2020 23:51:57 +0200 Subject: [PATCH] Don't assume an event's userfulness when showing logs --- logs/models.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/logs/models.py b/logs/models.py index 7af5c11c..292eead1 100644 --- a/logs/models.py +++ b/logs/models.py @@ -421,11 +421,6 @@ class VersionAction(HistoryEvent): def __init__(self, version): self.version = version - def is_useful(self): - # Some versions are duplicates, and don't have a reference - # to any object, so ignore them - return self.version.object_id is not None - def name(self): return "{} {}".format(self.model_name().title(), self.version.object_repr) @@ -490,7 +485,6 @@ class RevisionAction: self.performed_by = revision.user self.revision = revision self.versions = [VersionAction(v) for v in revision.version_set.all()] - self.versions = filter(lambda v: v.is_useful(), self.versions) def id(self): return self.revision.id