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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user