Updated the api refresh task to check main_char_id

This commit is contained in:
Raynaldo Rivera 2014-10-16 11:30:37 -07:00
parent 7e71c4607f
commit ecc46629df

View File

@ -128,6 +128,10 @@ def run_api_refresh():
if api_key_pairs:
valid_key = False
authserviceinfo = AuthServicesInfo.objects.get(user=user)
# We do a check on the authservice info to insure that we shoud run the check
# No point in running the check on people who arn't on services
if authserviceinfo.main_char_id:
if authserviceinfo.main_char_id != "":
for api_key_pair in api_key_pairs:
if EveApiManager.api_key_is_valid(api_key_pair.api_id, api_key_pair.api_key):
# Update characters