mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Show if the key is active on the corp list
This commit is contained in:
@@ -70,10 +70,16 @@ class EVEPlayerCharacter(EVEAPIModel):
|
||||
|
||||
@property
|
||||
def account(self):
|
||||
if self.eveaccount_set.count():
|
||||
return self.eveaccount_set.all()[0]
|
||||
if self.eveaccount_set.filter(api_status=API_STATUS_OK).count():
|
||||
return self.eveaccount_set.filter(api_status=API_STATUS_OK)[0]
|
||||
return None
|
||||
|
||||
@property
|
||||
def active_key(self):
|
||||
if self.eveaccount_set.count():
|
||||
return self.eveaccount_set.filter(api_status=API_STATUS_OK).count() > 0
|
||||
return False
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return ('eveapi-character', [self.pk])
|
||||
|
||||
Reference in New Issue
Block a user