mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.8.x] Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
Backport of a7b7f27c05 from master
This commit is contained in:
@@ -196,6 +196,12 @@ class TestFormField(TestCase):
|
||||
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(TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user