Merge pull request #32 from RDXT/master

Fixes #31 with threadlocal
This commit is contained in:
Jan-Jelle Kester 2015-07-29 13:49:06 +02:00
commit 06ab0bc8dd

View file

@ -71,4 +71,4 @@ class AuditlogMiddleware(object):
if sender == LogEntry and isinstance(user, auth_user_model) and instance.actor is None:
instance.actor = user
if hasattr(threadlocal, 'auditlog'):
instance.remote_addr = threading.local().auditlog['remote_addr']
instance.remote_addr = threadlocal.auditlog['remote_addr']