Make __repr__ slightly more detailed and add a few missing ones.
This includes raw events (which didn't have any) and a few other types that were missing them. Upon review some more useful fields were added to the repr output which would be more useful during debugging.
This commit is contained in:
@ -93,7 +93,8 @@ class AuditLogDiff:
|
||||
return iter(self.__dict__.items())
|
||||
|
||||
def __repr__(self):
|
||||
return '<AuditLogDiff attrs={0!r}>'.format(tuple(self.__dict__))
|
||||
values = ' '.join('%s=%r' % item for item in self.__dict__.items())
|
||||
return '<AuditLogDiff %s>' % values
|
||||
|
||||
class AuditLogChanges:
|
||||
TRANSFORMERS = {
|
||||
@ -164,6 +165,9 @@ class AuditLogChanges:
|
||||
self.after.color = self.after.colour
|
||||
self.before.color = self.before.colour
|
||||
|
||||
def __repr__(self):
|
||||
return '<AuditLogChanges before=%r after=%r>' % (self.before, self.after)
|
||||
|
||||
def _handle_role(self, first, second, entry, elem):
|
||||
if not hasattr(first, 'roles'):
|
||||
setattr(first, 'roles', [])
|
||||
|
Reference in New Issue
Block a user