diff --git a/README.md b/README.md index 1cdb07b1..02bb3eea 100755 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/eveonline/views.py b/eveonline/views.py index aaca93ab..a687fd37 100644 --- a/eveonline/views.py +++ b/eveonline/views.py @@ -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