mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-22 07:07:52 +00:00
🐛 修复用户名订阅失败
This commit is contained in:
parent
836ae880e6
commit
abb83c0cd4
@ -117,7 +117,7 @@ class FragmentSub:
|
||||
async def get_by_cid_and_username(cid: int, username: str) -> Optional[Fragment]:
|
||||
async with sqlite.Session() as session:
|
||||
session = cast(AsyncSession, session)
|
||||
statement = select(Fragment).where(Fragment.cid == cid and Fragment.username == username)
|
||||
statement = select(Fragment).where(Fragment.cid == cid).where(Fragment.username == username)
|
||||
results = await session.exec(statement)
|
||||
return post[0] if (post := results.first()) else None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user