sync: auto-sync from HOWARD-HOME at 2026-07-06 16:41:20

Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-06 16:41:20
This commit is contained in:
2026-07-06 16:41:48 -07:00
parent 419de64af5
commit 12c3d83f75
6 changed files with 1140 additions and 22 deletions

View File

@@ -230,7 +230,9 @@ class ScreenConnectClient:
@staticmethod
def _filter_literal(value: str) -> str:
"""Single-quote a value for the session-filter language, escaping any
embedded single quote by doubling it (SQL-style)."""
embedded single quote by doubling it. VERIFIED LIVE 2026-07-06:
`CustomProperty1 LIKE '*Andy''s*'` matched the "Andy's Mobile Fuel" session,
so doubling is the correct escape for this filter grammar."""
return "'" + str(value).replace("'", "''") + "'"
def build_session_filter(
@@ -249,7 +251,12 @@ class ScreenConnectClient:
CP1/CP2/CP3, `extra` is a raw clause appended verbatim. Defaults to the whole
Access fleet when nothing else is specified."""
clauses: list[str] = []
if session_type and session_type.lower() != "all":
if session_type and session_type.lower() == "all":
# 'all' = every session type. Only Access + Support exist on this
# instance; an OR clause is the verified match-all (a bare '*' matches
# nothing). VERIFIED LIVE 2026-07-06 -> 982 = 958 Access + 24 Support.
clauses.append("(SessionType = 'Access' OR SessionType = 'Support')")
elif session_type:
literal = SESSION_TYPE_LITERALS.get(session_type.lower(), session_type)
clauses.append(f"SessionType = {self._filter_literal(literal)}")
if name: