MCPcopy Create free account
hub / github.com/cppla/ServerStatus / normalize_optional_string

Function normalize_optional_string

server/manage_api.py:44–46  ·  view source on GitHub ↗
(item, field)

Source from the content-addressed store, hash-verified

42
43
44def normalize_optional_string(item, field):
45 value = item.get(field, "")
46 item[field] = "" if value is None else str(value).strip()
47
48
49def normalize_int(value, field, index=None, default=None, min_value=None, max_value=None):

Callers 2

validate_sslcertFunction · 0.85
validate_watchdogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected