Skip to content

Commit

Permalink
fix logging when anonymous clients are allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
karlcz committed Apr 19, 2016
1 parent b6273ad commit 2eee798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hatrac/rest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def log_parts():
"""Generate a dictionary of interpolation keys used by our logging template."""
now = datetime.datetime.now(pytz.timezone('UTC'))
elapsed = (now - web.ctx.hatrac_start_time)
client_identity = web.ctx.webauthn2_context.client if web.ctx.webauthn2_context else ''
client_identity = web.ctx.webauthn2_context.client if web.ctx.webauthn2_context and web.ctx.webauthn2_context.client else ''
if type(client_identity) is dict:
client_identity = json.dumps(client_identity, separators=(',',':'))
parts = dict(
Expand Down

0 comments on commit 2eee798

Please sign in to comment.