mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Added a easy way to lookup a account
This commit is contained in:
@@ -68,6 +68,12 @@ class EVEPlayerCharacter(EVEAPIModel):
|
||||
except EVEPlayerCharacterSkill.DoesNotExist:
|
||||
return None
|
||||
|
||||
@property
|
||||
def account(self)
|
||||
if self.eveaccount_set.count():
|
||||
return self.eveaccount_set.all()[0]
|
||||
return None
|
||||
|
||||
def __unicode__(self):
|
||||
if self.name:
|
||||
return self.name
|
||||
|
||||
Reference in New Issue
Block a user