Skip to content

Commit

Permalink
[#3378] Change order of debug statement
Browse files Browse the repository at this point in the history
Otherwise if there is a unicode error it won't get caught before
decoding
  • Loading branch information
amercader committed Jan 4, 2017
1 parent fbe614d commit 471bea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/views/__init__.py
Expand Up @@ -173,8 +173,8 @@ def _get_user_for_apikey():
apikey = u''
if not apikey:
return None
log.debug(u'Received API Key: %s' % apikey)
apikey = apikey.decode('utf8', 'ignore')
log.debug(u'Received API Key: %s' % apikey)
query = model.Session.query(model.User)
user = query.filter_by(apikey=apikey).first()
return user

0 comments on commit 471bea5

Please sign in to comment.