mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #18530 -- Fixed a small regression in the admin filters where wrongly formatted dates passed as url parameters caused an unhandled ValidationError. Thanks to david for the report.
This commit is contained in:
@@ -436,6 +436,10 @@ class AdminViewBasicTest(TestCase):
|
||||
response = self.client.get('/test_admin/%s/admin_views/thing/' % self.urlbit, {'color__id__exact': 'StringNotInteger!'})
|
||||
self.assertRedirects(response, '/test_admin/%s/admin_views/thing/?e=1' % self.urlbit)
|
||||
|
||||
# Regression test for #18530
|
||||
response = self.client.get('/test_admin/%s/admin_views/thing/' % self.urlbit, {'pub_date__gte': 'foo'})
|
||||
self.assertRedirects(response, '/test_admin/%s/admin_views/thing/?e=1' % self.urlbit)
|
||||
|
||||
def testIsNullLookups(self):
|
||||
"""Ensure is_null is handled correctly."""
|
||||
Article.objects.create(title="I Could Go Anywhere", content="Versatile", date=datetime.datetime.now())
|
||||
|
||||
Reference in New Issue
Block a user