Skip to content

Commit

Permalink
TRACK-249: Delete request from DB required query filter to be setup (#…
Browse files Browse the repository at this point in the history
…2418)

* TRACK-249: Delete request from DB required query filter to be setup

* Update work_issues.py

Fixed bracket indentation for linting

* Update work_issues.py

Flake8 linting issues
  • Loading branch information
Ckoelewyn authored Oct 25, 2024
1 parent 0fb68a6 commit 846ddbc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions epictrack-api/src/api/models/work_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ class WorkIssues(BaseModelVersioned):

@classmethod
def list_issues_for_work_id(cls, work_id) -> List[WorkIssues]:
"""List all WorkIssues sorted by start_date."""
query = WorkIssues.query.filter(cls.work_id == work_id).order_by(
"""List all WorkIssues sorted by start_date, filtering out WorkIssues marked as deleted in the DB"""
query = WorkIssues.query.filter(
cls.work_id == work_id,
cls.is_deleted.is_(False)
).order_by(
cls.start_date.desc()
)
return query.all()

0 comments on commit 846ddbc

Please sign in to comment.