fix: treat empty string as no filter in mempalace_search wing/room (#1097)

* fix: treat empty string as no filter in mempalace_search wing/room

* fix: also treat whitespace-only strings as no filter
This commit is contained in:
Kunal Garhewal
2026-04-24 03:49:18 +05:30
committed by GitHub
parent df3ee289fc
commit 9947ad06df
+1 -1
View File
@@ -285,7 +285,7 @@ def _get_cached_metadata(col, where=None):
def _sanitize_optional_name(value: str = None, field_name: str = "name") -> str:
"""Validate optional wing/room-style filters."""
if value is None:
if value is None or not value.strip():
return None
return sanitize_name(value, field_name)