mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
fix bug
This commit is contained in:
parent
6319c7fce1
commit
a77e85b62d
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user