8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-25 22:22:26 +00:00

Fix typos in logs/models.py

This commit is contained in:
Jean-Romain Garnier 2020-04-23 20:30:54 +02:00 committed by Jean-Romain Garnier
parent fbd43ea389
commit 3fa84d8216

View file

@ -415,7 +415,7 @@ class UserHistoryEvent(HistoryEvent):
def __eq__(self, other): def __eq__(self, other):
return ( return (
and self.edited_fields == other.edited_fields self.edited_fields == other.edited_fields
and self.date == other.date and self.date == other.date
and self.performed_by == other.performed_by and self.performed_by == other.performed_by
and self.comment == other.comment and self.comment == other.comment
@ -470,7 +470,7 @@ class UserHistory(History):
) )
for version in user_versions: for version in user_versions:
self._add_revision(user, version) self._add_revision(version)
# Do the same thing for the Adherent of Club # Do the same thing for the Adherent of Club
self._last_version = None self._last_version = None
@ -480,7 +480,7 @@ class UserHistory(History):
) )
for version in obj_versions: for version in obj_versions:
self._add_revision(user, version) self._add_revision(version)
# Remove duplicates and sort # Remove duplicates and sort
self.events = list(dict.fromkeys(self.events)) self.events = list(dict.fromkeys(self.events))
@ -490,7 +490,7 @@ class UserHistory(History):
reverse=True reverse=True
) )
def _add_revision(self, user, version): def _add_revision(self, version):
""" """
Add a new revision to the chronological order Add a new revision to the chronological order
:param user: User, The user displayed in this history :param user: User, The user displayed in this history
@ -509,7 +509,7 @@ class UserHistory(History):
self._last_version = version self._last_version = version
return return
evt = UserHistoryEvent(user, version, self._last_version, diff) evt = UserHistoryEvent(version, self._last_version, diff)
self.events.append(evt) self.events.append(evt)
self._last_version = version self._last_version = version
@ -597,4 +597,4 @@ class InterfaceHistory(History):
self.event_type = InterfaceHistoryEvent self.event_type = InterfaceHistoryEvent
def get(self, interface_id): def get(self, interface_id):
return super(InterfaceHistory, self).get(machine_id, Interface) return super(InterfaceHistory, self).get(interface_id, Interface)