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

Method _get_by_id

st2api/st2api/controllers/resource.py:415–425  ·  view source on GitHub ↗
(self, resource_id, exclude_fields=None, include_fields=None)

Source from the content-addressed store, hash-verified

413 return result
414
415 def _get_by_id(self, resource_id, exclude_fields=None, include_fields=None):
416 try:
417 resource_db = self.access.get(
418 id=resource_id,
419 exclude_fields=exclude_fields,
420 only_fields=include_fields,
421 )
422 except ValidationError:
423 resource_db = None
424
425 return resource_db
426
427 def _get_by_name(self, resource_name, exclude_fields=None, include_fields=None):
428 try:

Callers 3

_get_one_by_idMethod · 0.95
_get_by_name_or_idMethod · 0.95
_get_by_ref_or_idMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected