MCPcopy Create free account
hub / github.com/StackStorm/st2 / to_mongo

Method to_mongo

st2common/st2common/fields.py:382–389  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

380 super(JSONDictField, self).__init__(*args, **kwargs)
381
382 def to_mongo(self, value):
383 if not isinstance(value, dict):
384 raise ValueError(
385 "value argument must be a dictionary (got: %s)" % type(value)
386 )
387
388 data = self._serialize_field_value(value)
389 return data
390
391 def to_python(self, value):
392 if isinstance(value, dict):

Calls 1