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

Method _get_field_value

st2client/st2client/formatters/table.py:194–201  ·  view source on GitHub ↗
(value, field_name)

Source from the content-addressed store, hash-verified

192
193 @staticmethod
194 def _get_field_value(value, field_name):
195 r_val = value.get(field_name, None)
196 if r_val is None:
197 return ""
198
199 if isinstance(r_val, list) or isinstance(r_val, dict):
200 return r_val if len(r_val) > 0 else ""
201 return r_val
202
203 @staticmethod
204 def _get_friendly_column_name(name):

Callers 1

formatMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected