From 89ef6c9a7f5459fcaf4bb06eb27d5351992af6e8 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 31 May 2017 11:04:46 -0600 Subject: [PATCH] Add option/fix for user models with UUIDs (#28) * Add option/fix for user models with UUIDs * Remove unnecessary configuration --- tos/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tos/middleware.py b/tos/middleware.py index 39abb89..f0006cf 100644 --- a/tos/middleware.py +++ b/tos/middleware.py @@ -38,7 +38,7 @@ class UserAgreementMiddleware(deprecation.MiddlewareMixin if DJANGO_VERSION >= ( # for the user object. # NOTE: We use the user ID because it's not user-settable and it won't # ever change (usernames and email addresses can change) - user_id = int(request.session['_auth_user_id']) + user_id = request.session['_auth_user_id'] user_auth_backend = request.session['_auth_user_backend'] # Get the cache prefix