Skip to content

Commit 7e3bfbe

Browse files
committed
suggested changes
1 parent ae1e8be commit 7e3bfbe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nhsn/delphi_nhsn/patch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ def patch(params):
7878

7979
patch_list = filter_source_files(source_files)
8080
for file in patch_list:
81-
issue_date = datetime.strptime(file.name.split(".")[0], "%Y%m%d")
82-
logger.info("Running issue", issue_date=issue_date.strftime("%Y-%m-%d"))
83-
params["patch"]["issue_date"] = issue_date.strftime("%Y%m%d")
84-
# regardless of week date type or not the directory name must be issue_date_yyyymmdd
81+
issue_date_str = file.name.split(".")[0]
82+
logger.info("Running issue", issue_date=datetime.strptime(issue_date_str, "%Y%m%d").strftime("%Y-%m-%d"))
83+
params["patch"]["issue_date"] = issue_date_str
84+
# regardless of week date type or not the directory name must be issue_date_YYYYMMDD
8585
# conversion in done in acquisition
86-
current_issue_dir = f"{params['patch']['patch_dir']}/issue_{issue_date.strftime('%Y%m%d')}/nhsn"
86+
current_issue_dir = f"{params['patch']['patch_dir']}/issue_{issue_date_str}/nhsn"
8787
makedirs(current_issue_dir, exist_ok=True)
8888
params["common"]["export_dir"] = current_issue_dir
8989
params["common"]["custom_run"] = True

0 commit comments

Comments
 (0)