MCPcopy
hub / github.com/django/django / get_prep_value

Method get_prep_value

django/contrib/postgres/fields/hstore.py:57–72  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

55 )
56
57 def get_prep_value(self, value):
58 value = super().get_prep_value(value)
59
60 if isinstance(value, dict):
61 prep_value = {}
62 for key, val in value.items():
63 key = str(key)
64 if val is not None:
65 val = str(val)
66 prep_value[key] = val
67 value = prep_value
68
69 if isinstance(value, list):
70 value = [str(item) for item in value]
71
72 return value
73
74
75HStoreField.register_lookup(lookups.DataContains)

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected