From 83a8da576dc6ccd6986e6426a308b69b9639b818 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 26 Oct 2020 05:44:55 -0400 Subject: [PATCH] Fixed admin_views's test_history_view on databases that don't use serial pks. --- tests/admin_views/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 7b884345e1..a07abf273f 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -2227,8 +2227,8 @@ class AdminViewPermissionsTest(TestCase): self.assertEqual(response.status_code, 200) # Test redirection when using row-level change permissions. Refs #11513. - rl1 = RowLevelChangePermissionModel.objects.create(name="odd id") - rl2 = RowLevelChangePermissionModel.objects.create(name="even id") + rl1 = RowLevelChangePermissionModel.objects.create(id=1, name="odd id") + rl2 = RowLevelChangePermissionModel.objects.create(id=2, name="even id") logins = [self.superuser, self.viewuser, self.adduser, self.changeuser, self.deleteuser] for login_user in logins: with self.subTest(login_user.username):