Fixes a discrepancy between corp and alliance mode, causing all characters to appear double in corporation mode.

This commit is contained in:
Ydmir 2016-04-04 23:35:22 +02:00
parent b73fb4bf5a
commit 23eec8e9a5
2 changed files with 3 additions and 3 deletions

View File

@ -108,8 +108,8 @@ def corp_member_view(request, corpid = None):
characters_without_api.update({member_data["name"]: member_data["id"]})
for char in EveCharacter.objects.filter(corporation_id=corpid):
if not char.character_id in member_list:
logger.info("Character %s does not exist in EveWho dump." % char.character_name)
if not int(char.character_id) in member_list:
logger.info("Character '%s' does not exist in EveWho dump." % char.character_name)
char_owner = char.user
try:
mainid = int(AuthServicesInfoManager.get_auth_service_info(user=char_owner).main_char_id)

View File

@ -21,7 +21,7 @@ class EveWhoManager():
page_count=0
while len(data["characters"]):
for row in data["characters"]:
members[row["character_id"]] = {"name":row["name"], "id":row["character_id"]}
members[int(row["character_id"])] = {"name":row["name"], "id":int(row["character_id"])}
page_count=page_count+1
jsondata = requests.get(url + "&page=%i" % page_count).content
data = json.loads(jsondata.decode())