Skip to content

Commit

Permalink
remove hanging or_
Browse files Browse the repository at this point in the history
  • Loading branch information
tolkamps1 committed Dec 10, 2024
1 parent b3fdb8b commit a531cae
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions epictrack-api/src/api/reports/anticipated_schedule_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from api.models.work_issues import WorkIssues
from api.models.work_issue_updates import WorkIssueUpdates
from api.models.work_type import WorkType, WorkTypeEnum
from api.models.event_type import EventTypeEnum
from api.models.ministry import Ministry
from api.models.phase_code import PhaseCode
from api.models.project import Project
Expand Down Expand Up @@ -203,27 +202,23 @@ def _fetch_data(self, report_date):
Event.is_active.is_(True),
and_(
Work.work_type_id == 5, # Exemption Order
or_(
Event.event_configuration_id.in_(
db.session.query(EventConfiguration.id).filter(
EventConfiguration.event_category_id == EventCategoryEnum.DECISION.value,
EventConfiguration.name != "IPD/EP Approval Decision (Day Zero)",
EventConfiguration.event_type_id == EventTypeEnum.CEAO_DECISION.value
)
),
Event.event_configuration_id.in_(
db.session.query(EventConfiguration.id).filter(
EventConfiguration.event_category_id == EventCategoryEnum.DECISION.value,
EventConfiguration.name != "IPD/EP Approval Decision (Day Zero)",
EventConfiguration.event_type_id == EventTypeEnum.CEAO_DECISION.value
)
)
),
and_(
Work.work_type_id == 6, # Assessment
or_(
Event.event_configuration_id.in_(
db.session.query(EventConfiguration.id).filter(
EventConfiguration.event_category_id == EventCategoryEnum.DECISION.value,
EventConfiguration.name != "IPD/EP Approval Decision (Day Zero)",
EventConfiguration.name != "Revised EAC Application Acceptance Decision (Day Zero)",
EventConfiguration.event_type_id == EventTypeEnum.CEAO_DECISION.value
)
),
Event.event_configuration_id.in_(
db.session.query(EventConfiguration.id).filter(
EventConfiguration.event_category_id == EventCategoryEnum.DECISION.value,
EventConfiguration.name != "IPD/EP Approval Decision (Day Zero)",
EventConfiguration.name != "Revised EAC Application Acceptance Decision (Day Zero)",
EventConfiguration.event_type_id == EventTypeEnum.CEAO_DECISION.value
)
)
),
and_(
Expand Down Expand Up @@ -265,7 +260,7 @@ def _fetch_data(self, report_date):
EventConfiguration.event_category_id == EventCategoryEnum.DECISION.value,
EventConfiguration.name != "Delegation of Transfer Decision to Minister",
or_(
EventConfiguration.event_type_id == EventTypeEnum.CEAO_DECISION.value
EventConfiguration.event_type_id == EventTypeEnum.CEAO_DECISION.value,
EventConfiguration.event_type_id == EventTypeEnum.ADM.value
)
)
Expand Down

0 comments on commit a531cae

Please sign in to comment.