mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Use account PK instead of the user_id variable
This commit is contained in:
@@ -12,7 +12,8 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
## EVE Proxy
|
## EVE Proxy
|
||||||
EVE_API_URL = "https://api.eveonline.com"
|
|
||||||
|
EVE_API_URL = "https://apitest.eveonline.com"
|
||||||
EVE_PROXY_KEEP_LOGS = 30
|
EVE_PROXY_KEEP_LOGS = 30
|
||||||
|
|
||||||
## SSO
|
## SSO
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ def import_eve_character_func(character_id, key_id=None, logger=logging.getLogge
|
|||||||
try:
|
try:
|
||||||
char_doc = CachedDocument.objects.api_query('/char/CharacterSheet.xml.aspx', params=auth_params, no_cache=False)
|
char_doc = CachedDocument.objects.api_query('/char/CharacterSheet.xml.aspx', params=auth_params, no_cache=False)
|
||||||
except DocumentRetrievalError, exc:
|
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
|
raise APIAccessException
|
||||||
|
|
||||||
doc = basic_xml_parse_doc(char_doc)['eveapi']
|
doc = basic_xml_parse_doc(char_doc)['eveapi']
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ class CachedDocumentManager(models.Manager):
|
|||||||
url = self.construct_url(url_path, params)
|
url = self.construct_url(url_path, params)
|
||||||
doc_key = sha1(url).hexdigest()
|
doc_key = sha1(url).hexdigest()
|
||||||
|
|
||||||
|
print url
|
||||||
|
|
||||||
try:
|
try:
|
||||||
doc = super(CachedDocumentManager, self).get_query_set().get(pk=doc_key)
|
doc = super(CachedDocumentManager, self).get_query_set().get(pk=doc_key)
|
||||||
created = False
|
created = False
|
||||||
|
|||||||
Reference in New Issue
Block a user