Use account PK instead of the user_id variable

This commit is contained in:
2011-08-31 17:17:07 +01:00
parent c28aefc2a8
commit e3a0e51859
3 changed files with 5 additions and 2 deletions

View File

@@ -12,7 +12,8 @@ DATABASES = {
}
## EVE Proxy
EVE_API_URL = "https://api.eveonline.com"
EVE_API_URL = "https://apitest.eveonline.com"
EVE_PROXY_KEEP_LOGS = 30
## SSO

View File

@@ -129,7 +129,7 @@ def import_eve_character_func(character_id, key_id=None, logger=logging.getLogge
try:
char_doc = CachedDocument.objects.api_query('/char/CharacterSheet.xml.aspx', params=auth_params, no_cache=False)
except DocumentRetrievalError, exc:
logger.error('Error retrieving CharacterSheet.xml.aspx for User ID %s, Character ID %s - %s' % (user_id, character_id, exc))
logger.error('Error retrieving CharacterSheet.xml.aspx for User ID %s, Character ID %s - %s' % (acc.pk, character_id, exc))
raise APIAccessException
doc = basic_xml_parse_doc(char_doc)['eveapi']

View File

@@ -57,6 +57,8 @@ class CachedDocumentManager(models.Manager):
url = self.construct_url(url_path, params)
doc_key = sha1(url).hexdigest()
print url
try:
doc = super(CachedDocumentManager, self).get_query_set().get(pk=doc_key)
created = False