fix/various fixes
This commit is contained in:
@@ -45,7 +45,10 @@ async def get_segment_count(user_id: str, db: AsyncSession) -> int:
|
||||
stmt = (
|
||||
select(func.count(Segment.id))
|
||||
.join(Conversation, Segment.conversation_id == Conversation.id)
|
||||
.where(Conversation.user_id == user_id)
|
||||
.where(
|
||||
Conversation.user_id == user_id,
|
||||
Conversation.deleted_at.is_(None),
|
||||
)
|
||||
)
|
||||
result = await db.execute(stmt)
|
||||
return result.scalar() or 0
|
||||
|
||||
Reference in New Issue
Block a user