Added alt support to corp stats

This commit is contained in:
Raynaldo Rivera 2014-11-10 11:33:38 -07:00
parent ea2b5ae819
commit d0f40307e7
2 changed files with 6 additions and 8 deletions

View File

@ -47,6 +47,6 @@ Special Permissions In Admin:
auth | user | human_resources ( Corp only access to view applications ) auth | user | human_resources ( Corp only access to view applications )
auth | user | jabber_broadcast ( Access to broadcast a message over jabber to specific groups or all) auth | user | jabber_broadcast ( Access to broadcast a message over jabber to specific groups or all)
auth | user | blue_memeber ( Auto Added to people who register has a blue when adding api key) auth | user | blue_memeber ( Auto Added to people who register has a blue when adding api key)
auth | user | corp_stats (View basic corp auth stats *who is authed etc*)
Brought to you by The 99 Percent skunkworks. Brought to you by The 99 Percent skunkworks.

View File

@ -141,15 +141,13 @@ def corp_stats_view(request):
corp = EveCorporationInfo.objects.get(corporation_id=main_char.corporation_id) corp = EveCorporationInfo.objects.get(corporation_id=main_char.corporation_id)
current_count = 0 current_count = 0
allcharacters = [] allcharacters = []
all_auth = AuthServicesInfo.objects.all() all_characters = EveCharacter.objects.all()
for auth in all_auth: for char in all_characters:
if auth.main_char_id != "": if char:
try: try:
user_char = EveCharacter.objects.get(character_id=auth.main_char_id) if char.corporation_id == corp.corporation_id:
if user_char.corporation_id == corp.corporation_id:
current_count = current_count + 1 current_count = current_count + 1
allcharacters.append(user_char) allcharacters.append(char)
except: except:
pass pass