Skip to content

Commit

Permalink
[Track-298] Filter RF team member query by active staff (#2462)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolkamps1 authored Dec 2, 2024
1 parent 6d54b75 commit ff51a5c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions epictrack-api/src/api/reports/resource_forecast_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,14 @@ def _get_work_team_members(self, work_id) -> Tuple[List[str], str]:
work_lead = ""
work_team_members = (
db.session.query(StaffWorkRole)
.filter(StaffWorkRole.work_id == work_id)
.filter(StaffWorkRole.is_active.is_(True))
.join(Staff, Staff.id == StaffWorkRole.staff_id)
.filter(
StaffWorkRole.work_id == work_id,
StaffWorkRole.is_deleted.is_(False),
StaffWorkRole.is_active.is_(True),
Staff.is_active.is_(True),
Staff.is_deleted.is_(False)
)
.add_columns(
Staff.first_name.label("first_name"),
Staff.last_name.label("last_name"),
Expand Down

0 comments on commit ff51a5c

Please sign in to comment.