diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py
index ab2bc20..92ab5c8 100644
a
|
b
|
class Color2(Color):
|
118 | 118 | class Thing(models.Model): |
119 | 119 | title = models.CharField(max_length=20) |
120 | 120 | color = models.ForeignKey(Color, limit_choices_to={'warm': True}) |
| 121 | date = models.DateField(blank=True, null=True) |
121 | 122 | def __unicode__(self): |
122 | 123 | return self.title |
123 | 124 | |
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
index f074d77..6fc6da3 100644
a
|
b
|
class AdminViewBasicTest(TestCase):
|
453 | 453 | response = self.client.get('/test_admin/%s/admin_views/thing/' % self.urlbit, {'color__id__exact': 'StringNotInteger!'}) |
454 | 454 | self.assertRedirects(response, '/test_admin/%s/admin_views/thing/?e=1' % self.urlbit) |
455 | 455 | |
| 456 | # Regression test for #18530 |
| 457 | response = self.client.get('/test_admin/%s/admin_views/thing/' % self.urlbit, {'date__gte': 'foo'}) |
| 458 | self.assertRedirects(response, '/test_admin/%s/admin_views/thing/?e=1' % self.urlbit) |
| 459 | |
456 | 460 | def testIsNullLookups(self): |
457 | 461 | """Ensure is_null is handled correctly.""" |
458 | 462 | Article.objects.create(title="I Could Go Anywhere", content="Versatile", date=datetime.datetime.now()) |