From ea2b5ae819be52c1b65224299bc9052b602bd699 Mon Sep 17 00:00:00 2001 From: Raynaldo Rivera Date: Mon, 10 Nov 2014 01:17:49 -0700 Subject: [PATCH] Fixing issue when characters don't exist in corporations tats --- eveonline/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eveonline/views.py b/eveonline/views.py index a83025d1..aaca93ab 100644 --- a/eveonline/views.py +++ b/eveonline/views.py @@ -144,11 +144,14 @@ def corp_stats_view(request): all_auth = AuthServicesInfo.objects.all() for auth in all_auth: if auth.main_char_id != "": - user_char = EveCharacter.objects.get(character_id=auth.main_char_id) + try: + user_char = EveCharacter.objects.get(character_id=auth.main_char_id) - if user_char.corporation_id == corp.corporation_id: - current_count = current_count + 1 - allcharacters.append(user_char) + if user_char.corporation_id == corp.corporation_id: + current_count = current_count + 1 + allcharacters.append(user_char) + except: + pass context = {"corp": corp, "currentCount": current_count,