mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
修复今日运势出错的问题
This commit is contained in:
parent
7293d96962
commit
bb0ac6551e
1 changed files with 6 additions and 4 deletions
|
|
@ -32,10 +32,11 @@ class QrFortune(Model):
|
|||
if not result:
|
||||
# 执行初始化
|
||||
await cls.bulk_create(Fortune_initial_data)
|
||||
result = random.choice(await cls.all())
|
||||
# 把抽取的今日运势插入日志
|
||||
await QrFortuneLog.insert_fortune_log(result, member_openid)
|
||||
return
|
||||
result = random.choice(await cls.all())
|
||||
# 把抽取的今日运势插入日志
|
||||
await QrFortuneLog.insert_fortune_log(result, member_openid)
|
||||
return result
|
||||
print(result)
|
||||
return result
|
||||
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ class QrFortuneLog(Model):
|
|||
:return:
|
||||
"""
|
||||
existing_record = await cls.get_or_none(user_id=member_openid, extract_time=datetime.now().date())
|
||||
print(existing_record)
|
||||
return existing_record
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Reference in a new issue