MCPcopy
hub / github.com/django/django / has_changed

Method has_changed

django/contrib/postgres/forms/hstore.py:51–59  ·  view source on GitHub ↗

Return True if data differs from initial.

(self, initial, data)

Source from the content-addressed store, hash-verified

49 return value
50
51 def has_changed(self, initial, data):
52 """
53 Return True if data differs from initial.
54 """
55 # For purposes of seeing whether something has changed, None is
56 # the same as an empty dict, if the data or initial value we get
57 # is None, replace it w/ {}.
58 initial_value = self.to_python(initial)
59 return super().has_changed(initial_value, data)

Callers

nothing calls this directly

Calls 1

to_pythonMethod · 0.95

Tested by

no test coverage detected