fix: Properly __repr__ MISPUser

pull/434/head
Raphaël Vinot 2019-08-07 18:20:38 +02:00
parent f9c8fb815e
commit 7a5945a5ce
1 changed files with 5 additions and 0 deletions

View File

@ -862,6 +862,11 @@ class MISPUser(AbstractMISP):
kwargs = kwargs.get('User')
super(MISPUser, self).from_dict(**kwargs)
def __repr__(self):
if hasattr(self, 'email'):
return '<{self.__class__.__name__}(object_uuid={self.email})'.format(self=self)
return '<{self.__class__.__name__}(NotInitialized)'.format(self=self)
class MISPOrganisation(AbstractMISP):