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 | 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 | corp_stats (View basic corp auth stats *who is authed etc*)
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)
current_count = 0
allcharacters = []
all_auth = AuthServicesInfo.objects.all()
for auth in all_auth:
if auth.main_char_id != "":
all_characters = EveCharacter.objects.all()
for char in all_characters:
if char:
try:
user_char = EveCharacter.objects.get(character_id=auth.main_char_id)
if user_char.corporation_id == corp.corporation_id:
if char.corporation_id == corp.corporation_id:
current_count = current_count + 1
allcharacters.append(user_char)
allcharacters.append(char)
except:
pass