Skip to content

Commit f4cc439

Browse files
committed
issue date must be 8 digits
1 parent 51edb05 commit f4cc439

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nhsn/delphi_nhsn/patch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ def patch(params):
7979
patch_list = filter_source_files(source_files)
8080
for file in patch_list:
8181
issue_date = datetime.strptime(file.name.split(".")[0], "%Y%m%d")
82-
current_issue_ew = Week.fromdate(issue_date)
8382
logger.info("Running issue", issue_date=issue_date.strftime("%Y-%m-%d"))
8483
params["patch"]["issue_date"] = issue_date.strftime("%Y%m%d")
85-
current_issue_dir = f"{params['patch']['patch_dir']}/issue_{current_issue_ew}/nhsn"
84+
# regardless of week date type or not the directory name must be issue_date_yyyymmdd
85+
# conversion in done in acquisition
86+
current_issue_dir = f"{params['patch']['patch_dir']}/issue_{issue_date.strftime('%Y%m%d')}/nhsn"
8687
makedirs(current_issue_dir, exist_ok=True)
8788
params["common"]["export_dir"] = current_issue_dir
8889
params["common"]["custom_run"] = True

0 commit comments

Comments
 (0)