MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _optional_positive_int

Function _optional_positive_int

deployments/desktop/server.py:99–102  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

97 return max(1, min(14, (today - selected).days + 1))
98
99
100def _optional_positive_int(value: Any) -> Optional[int]:
101 if value in (None, ""):
102 return None
103 return max(1, int(value))
104
105

Callers 2

_api_dailyFunction · 0.85
_api_daily_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected