Safe nickname penguin attribute

This commit is contained in:
Ben 2019-05-29 23:07:09 +01:00
parent 9d63087801
commit ef2902e644

View File

@ -43,6 +43,9 @@ class Penguin(Spheniscidae):
def penguin_state(self): def penguin_state(self):
return str() return str()
@property
def nickname(self):
return self.data.nickname if self.data.approval else "P" + self.data.id
async def load(self): async def load(self):
if self.data: if self.data: