mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-13 16:10:05 +08:00
fix bug
This commit is contained in:
@@ -172,12 +172,14 @@ class WordBank(db.Model):
|
|||||||
q_key = [x for x in q_key if str(x.problem) in (problem)]
|
q_key = [x for x in q_key if str(x.problem) in (problem)]
|
||||||
q += q_fuzzy + q_key
|
q += q_fuzzy + q_key
|
||||||
elif FUZZY:
|
elif FUZZY:
|
||||||
q = await cls.query.where(
|
q_fuzzy = await cls.query.where(
|
||||||
(cls.group_id == group_id) & (cls.search_type == 2) & (
|
(cls.group_id == group_id) & (cls.search_type == 2) & (
|
||||||
cls.problem.contains(f'{problem}'))).gino.all()
|
cls.problem.contains(f'{problem}'))).gino.all()
|
||||||
|
q += q_fuzzy
|
||||||
elif KEY:
|
elif KEY:
|
||||||
q = await cls.query.where((cls.group_id == group_id) & (cls.search_type == 1)).gino.all()
|
q_key = await cls.query.where((cls.group_id == group_id) & (cls.search_type == 1)).gino.all()
|
||||||
q = [x for x in q if str(x.problem) in (problem)]
|
q_key = [x for x in q_key if str(x.problem) in (problem)]
|
||||||
|
q += q_key
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user