mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user