Skip to content

Commit

Permalink
template fixes and natsort block removed (bcgov#2026)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinesh-aot authored Mar 22, 2024
1 parent e1be6a5 commit 3134d5b
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion epictrack-api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ tzdata==2023.4
urllib3==2.1.0
zipp==3.17.0
matplotlib==3.7.4
natsort[icu]==8.4.0
natsort==8.4.0
2 changes: 1 addition & 1 deletion epictrack-api/requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ marshmallow-sqlalchemy==0.29.0
pandas==2.0.2
openpyxl==3.0.10
matplotlib==3.7.4
natsort[icu]==8.4.0
natsort==8.4.0
4 changes: 3 additions & 1 deletion epictrack-api/src/api/actions/lock_work_start_date.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Disable work start date action handler"""

from datetime import timedelta
from api.actions.base import ActionFactory
from api.models.work import Work

Expand All @@ -11,5 +12,6 @@ def run(self, source_event, params) -> None:
"""Set the work start date and mark start date as locked for changes"""
work = Work.find_by_id(source_event.work_id)
work.start_date_locked = params.get("start_date_locked")
work.start_date = source_event.actual_date
start_at = params.get("start_at") if params.get("start_at") else 0
work.start_date = source_event.actual_date + timedelta(days=start_at)
work.update(work.as_dict(recursive=False), commit=False)
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3134d5b

Please sign in to comment.