Ensure time log reports have an extension
This commit is contained in:
parent
4d3593e960
commit
535a380616
2 changed files with 5 additions and 0 deletions
|
|
@ -1076,6 +1076,8 @@ class TimeReportDialog(QDialog):
|
|||
)
|
||||
if not filename:
|
||||
return
|
||||
if not filename.endswith(".csv"):
|
||||
filename = f"{filename}.csv"
|
||||
|
||||
try:
|
||||
with open(filename, "w", newline="", encoding="utf-8") as f:
|
||||
|
|
@ -1124,6 +1126,8 @@ class TimeReportDialog(QDialog):
|
|||
)
|
||||
if not filename:
|
||||
return
|
||||
if not filename.endswith(".pdf"):
|
||||
filename = f"{filename}.pdf"
|
||||
|
||||
# ---------- Build chart image (hours per period) ----------
|
||||
per_period_minutes: dict[str, int] = defaultdict(int)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue