summaryrefslogtreecommitdiff
path: root/tests/auth_tests/urls_custom_user_admin.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-02 20:50:34 -0400
committerTim Graham <timograham@gmail.com>2015-09-23 19:31:10 -0400
commit849037af36000d53b0b3b52f780ff475534e195b (patch)
treef14248a2f5296cd0c3c1eeb0297df80388cc1f7f /tests/auth_tests/urls_custom_user_admin.py
parent5d383549eee498e4903fe290613d726a68615aca (diff)
Refs #23957 -- Required session verification per deprecation timeline.
Diffstat (limited to 'tests/auth_tests/urls_custom_user_admin.py')
-rw-r--r--tests/auth_tests/urls_custom_user_admin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auth_tests/urls_custom_user_admin.py b/tests/auth_tests/urls_custom_user_admin.py
index dc47be68c7..de33984fa5 100644
--- a/tests/auth_tests/urls_custom_user_admin.py
+++ b/tests/auth_tests/urls_custom_user_admin.py
@@ -10,8 +10,10 @@ class CustomUserAdmin(UserAdmin):
def log_change(self, request, object, message):
# LogEntry.user column doesn't get altered to expect a UUID, so set an
# integer manually to avoid causing an error.
+ original_pk = request.user.pk
request.user.pk = 1
super(CustomUserAdmin, self).log_change(request, object, message)
+ request.user.pk = original_pk
site.register(get_user_model(), CustomUserAdmin)