ajuste de cruds incompleto

This commit is contained in:
2026-04-06 16:06:31 -07:00
parent 61d386a7c7
commit 290a32364d
75 changed files with 3574 additions and 26 deletions

Binary file not shown.

View File

@@ -0,0 +1,25 @@
from sqlalchemy.orm import Session
from app.modules.clients.models import Client
def fiscal_number_exists(db: Session, fiscal_number: str) -> bool:
"""Verify if a client exist in db"""
if not fiscal_number:
return False
exists = db.query(Client).filter(
Client.fiscal_number == fiscal_number,
).first() is not None
return exists
def email_exist(db: Session, email: str) -> bool:
if not email:
return False
exist = db.query(Client).filter(
Client.email == email
).first() is not None
return exist