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

Method to_python

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

Source from the content-addressed store, hash-verified

153 self.error("Only datetime objects may used in a " "ComplexDateTimeField")
154
155 def to_python(self, value):
156 original_value = value
157 try:
158 return self._convert_from_db(value)
159 except:
160 return original_value
161
162 def to_mongo(self, value):
163 value = self.to_python(value)

Callers 2

validateMethod · 0.95
to_mongoMethod · 0.95

Calls 1

_convert_from_dbMethod · 0.95

Tested by

no test coverage detected