mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #28393 -- Added helpful error messages for invalid AutoField/FloatField/IntegerField values.
Co-authored-by: Diederik van der Boor <vdboor@edoburu.nl> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
This commit is contained in:
parent
1af469e67f
commit
25f21bd237
6 changed files with 97 additions and 4 deletions
|
@ -3853,7 +3853,7 @@ class TestTicket24279(TestCase):
|
|||
|
||||
class TestInvalidValuesRelation(SimpleTestCase):
|
||||
def test_invalid_values(self):
|
||||
msg = "invalid literal for int() with base 10: 'abc'"
|
||||
msg = "Field 'id' expected a number but got 'abc'."
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
Annotation.objects.filter(tag='abc')
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue