MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / get_field_value

Method get_field_value

apps/tools/serializers/tool.py:593–599  ·  view source on GitHub ↗
(debug_field_list, name, is_required)

Source from the content-addressed store, hash-verified

591
592 @staticmethod
593 def get_field_value(debug_field_list, name, is_required):
594 result = [field for field in debug_field_list if field.get("name") == name]
595 if len(result) > 0:
596 return result[-1].get("value")
597 if is_required:
598 raise AppApiException(500, f"{name}" + _("field has no value set"))
599 return None
600
601 @staticmethod
602 def convert_value(name: str, value: str, _type: str, is_required: bool):

Callers 1

debugMethod · 0.95

Calls 2

AppApiExceptionClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected