Fix a big bug

- Fix a bug that the server gets all items as one user's item
This commit is contained in:
Lost-MSth
2022-07-09 23:05:33 +08:00
parent 15134173c9
commit ef8e551261
2 changed files with 8 additions and 8 deletions

View File

@@ -373,8 +373,8 @@ class UserItemList:
self.c.execute(
'''select item_id from item where type=?''', (item_type,))
else:
self.c.execute('''select item_id, amount from user_item where type = :a''', {
'a': item_type})
self.c.execute('''select item_id, amount from user_item where type = :a and user_id = :b''', {
'a': item_type, 'b': self.user.user_id})
x = self.c.fetchall()
if not x:
return self