Add invalidate not yet with tests
All checks were successful
Backend CI / unit-test (push) Successful in 27s

This commit is contained in:
2025-09-17 16:36:56 +02:00
parent a0898fa29e
commit d1f1b3e66c
3 changed files with 59 additions and 0 deletions

View File

@@ -115,6 +115,13 @@ def get_trade_by_user_id_and_friendly_name(
return session.exec(statement).first()
def get_trades_by_user_id(session: Session, user_id: int) -> list[models.Trades]:
statement = select(models.Trades).where(
models.Trades.user_id == user_id,
)
return session.exec(statement).all()
# Cycles
def create_cycle(session: Session, cycle_data: Mapping) -> models.Cycles:
if hasattr(cycle_data, "dict"):