mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
Don't assume an event's userfulness when showing logs
This commit is contained in:
parent
0c7689adde
commit
301a8f0182
1 changed files with 0 additions and 6 deletions
|
@ -421,11 +421,6 @@ class VersionAction(HistoryEvent):
|
||||||
def __init__(self, version):
|
def __init__(self, version):
|
||||||
self.version = 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):
|
def name(self):
|
||||||
return "{} {}".format(self.model_name().title(), self.version.object_repr)
|
return "{} {}".format(self.model_name().title(), self.version.object_repr)
|
||||||
|
|
||||||
|
@ -490,7 +485,6 @@ class RevisionAction:
|
||||||
self.performed_by = revision.user
|
self.performed_by = revision.user
|
||||||
self.revision = revision
|
self.revision = revision
|
||||||
self.versions = [VersionAction(v) for v in revision.version_set.all()]
|
self.versions = [VersionAction(v) for v in revision.version_set.all()]
|
||||||
self.versions = filter(lambda v: v.is_useful(), self.versions)
|
|
||||||
|
|
||||||
def id(self):
|
def id(self):
|
||||||
return self.revision.id
|
return self.revision.id
|
||||||
|
|
Loading…
Reference in a new issue