From: Edward Delaporte Date: Sun, 14 Jun 2026 00:22:29 +0000 (-0500) Subject: Use contains check for zones X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-shop-bot.git/commitdiff_plain/050ee98fbbfea0a1cde53a5853e1da905f8cbb7b Use contains check for zones --- diff --git a/matrix_shop_bot/db.py b/matrix_shop_bot/db.py index 68728bb..a225f3c 100644 --- a/matrix_shop_bot/db.py +++ b/matrix_shop_bot/db.py @@ -51,7 +51,7 @@ class PreferStore(SQLModel, table=True): store_id: int | None = Field(default=None, foreign_key="store.id", primary_key=True) def _get_item_zone(item_name, session) -> str: - zone = session.exec(select(ItemZone).where(func.lower(ItemZone.name) == func.lower(item_name))).first() + zone = session.exec(select(ItemZone).where(func.lower(item_name).contains(func.lower(ItemZone.name)))).first() if zone: return zone.zone return 'No Zone Assigned'