chore: sync uncommitted working tree changes before clone cleanup

This commit is contained in:
CRM Bot
2026-06-10 20:52:56 +00:00
parent 3f5b7df178
commit 394a6e935d
44 changed files with 246 additions and 220 deletions
+4 -5
View File
@@ -2,8 +2,7 @@
from __future__ import annotations
from datetime import datetime, UTC
from typing import Optional
from datetime import UTC, datetime
from sqlalchemy import func, select
from sqlalchemy.ext.asyncio import AsyncSession
@@ -21,7 +20,7 @@ class EmailAlreadyTaken(Exception):
"""Raised when attempting to create/update a user with an existing email."""
async def get_user_by_id(db: AsyncSession, user_id: int) -> Optional[User]:
async def get_user_by_id(db: AsyncSession, user_id: int) -> User | None:
"""Fetch a user by ID (active only, soft-deleted excluded)."""
result = await db.execute(
select(User).where(User.id == user_id, User.deleted_at.is_(None))
@@ -30,8 +29,8 @@ async def get_user_by_id(db: AsyncSession, user_id: int) -> Optional[User]:
async def get_user_by_email(
db: AsyncSession, email: str, org_id: Optional[int] = None
) -> Optional[User]:
db: AsyncSession, email: str, org_id: int | None = None
) -> User | None:
"""Fetch a user by email, optionally scoped to an org."""
stmt = select(User).where(
User.email == email.lower(),