Skip to content

Commit

Permalink
remove extra get by id method since covered in jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
veekaybee committed Jan 28, 2025
1 parent bd80ce0 commit 21da5d6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lumigator/python/mzai/backend/backend/repositories/experiments.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from uuid import UUID

from sqlalchemy import desc
from sqlalchemy.orm import Session

from backend.records.experiments import ExperimentRecord
Expand All @@ -10,12 +7,3 @@
class ExperimentRepository(BaseRepository[ExperimentRecord]):
def __init__(self, session: Session):
super().__init__(ExperimentRecord, session)

def get_jobs_by_experiment_id(self, experiment_id: UUID) -> list[ExperimentRecord]:
return (
self.session.query(ExperimentRecord)
.where(ExperimentRecord.id == experiment_id)
.order_by(desc(ExperimentRecord.created_at))
.limit(2)
.all()
)

0 comments on commit 21da5d6

Please sign in to comment.