Fixes the cron jobs and account validation, enables account deletion

This commit is contained in:
2010-03-14 02:27:16 +00:00
parent 301aa58bf3
commit b6c402f4fa
5 changed files with 28 additions and 19 deletions

View File

@@ -28,6 +28,17 @@ def import_eve_account(api_key, user_id):
#print account_doc.body
dom = minidom.parseString(account_doc.body)
if dom.getElementsByTagName('error'):
try:
account = EVEAccount.objects.get(id=user_id)
except EVEAccount.DoesNotExist:
return
account.api_status = API_STATUS_OTHER_ERROR
account.save()
return
characters_node_children = dom.getElementsByTagName('rowset')[0].childNodes
# Create or retrieve the account last to make sure everything

View File

@@ -3,6 +3,7 @@ import logging
from django_cron import cronScheduler, Job
from eve_api.models.api_player import EVEAccount, EVEPlayerCorporation
import eve_api.api_puller.accounts
from eve_api.api_exceptions import APIAuthException, APINoUserIDException
class UpdateAPIs(Job):
"""