mirror of
https://github.com/django/django.git
synced 2025-11-01 20:31:40 +00:00
Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
This commit is contained in:
parent
6ed613b2a5
commit
a7b7f27c05
3 changed files with 16 additions and 9 deletions
|
|
@ -206,6 +206,12 @@ class TestFormField(PostgreSQLTestCase):
|
|||
form_w_hstore = HStoreFormTest({'f1': '{"a": 2}'}, initial={'f1': '{"a": 1}'})
|
||||
self.assertTrue(form_w_hstore.has_changed())
|
||||
|
||||
form_w_hstore = HStoreFormTest({'f1': '{"a": 1}'}, initial={'f1': {"a": 1}})
|
||||
self.assertFalse(form_w_hstore.has_changed())
|
||||
|
||||
form_w_hstore = HStoreFormTest({'f1': '{"a": 2}'}, initial={'f1': {"a": 1}})
|
||||
self.assertTrue(form_w_hstore.has_changed())
|
||||
|
||||
|
||||
class TestValidator(PostgreSQLTestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue