From ed2b6044ff024274d0f33a99055aafaf4fbebb40 Mon Sep 17 00:00:00 2001 From: SoulGateKey Date: Tue, 8 Apr 2025 11:18:40 +0800 Subject: [PATCH] mai2_item_present fixed --- titles/mai2/schema/item.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/titles/mai2/schema/item.py b/titles/mai2/schema/item.py index 3b7d8d4..8639ae5 100644 --- a/titles/mai2/schema/item.py +++ b/titles/mai2/schema/item.py @@ -728,10 +728,11 @@ class Mai2ItemData(BaseData): # Do an anti-join with the mai2_item_item table to exclude any # items the users have already owned. if exclude_owned: - sql = sql.join( + sql = sql.outerjoin( item, (present.c.itemKind == item.c.itemKind) & (present.c.itemId == item.c.itemId) + & (item.c.user == user_id) ) condition &= (item.c.itemKind.is_(None) & item.c.itemId.is_(None))