1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

[1.11.x] Fixed #27889 -- Fixed incorrect check error if ModelAdmin.ordering refers to 'pk'.

Backport of d82ee32aac from master
This commit is contained in:
David Szotten
2017-03-02 15:25:05 +00:00
committed by Tim Graham
parent f834c278b5
commit 93c8e2d50d
2 changed files with 3 additions and 2 deletions

View File

@@ -796,7 +796,7 @@ class OrderingCheckTests(CheckTestCase):
def test_valid_case(self):
class TestModelAdmin(ModelAdmin):
ordering = ('name',)
ordering = ('name', 'pk')
self.assertIsValid(TestModelAdmin, ValidationTestModel)