Merge pull request #359 from Ydmir/master

Remove double-characters in corputils for Corporation mode
This commit is contained in:
Mr McClain 2016-04-05 02:11:35 -05:00
commit f4ae7a4e2c
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())