Skip to content

Commit fa9018e

Browse files
authored
Modify code so report can be overwritten
1 parent 57056cd commit fa9018e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

brainimagelibrary/reports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def fetch_and_load_csv(url, file_path):
116116
return df
117117

118118

119-
def __create_daily_report():
119+
def __create_daily_report(overwrite=False):
120120
"""
121121
Creates or retrieves the daily inventory report.
122122
@@ -141,7 +141,7 @@ def __create_daily_report():
141141
today = datetime.today().strftime("%Y%m%d")
142142
output_filename = f"{directory}/{today}.tsv"
143143

144-
if Path(output_filename).exists():
144+
if overwrite == False and Path(output_filename).exists():
145145
print(f"Daily report {output_filename} found on disk.")
146146
df = pd.read_csv(output_filename, sep="\t")
147147
return df

0 commit comments

Comments
 (0)