Fix minor issue in session log conversion

This commit is contained in:
Veronica Berglyd Olsen committed 2023-06-15 23:26:27 +02:00
1 parent 0689e977ea
commit 6193e3191b
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -451,9 +451,9 @@ class GuiWritingStats(QDialog):
except Exception:
logger.error("Invalid session log record")
continue
wcNovel = checkInt(record.get("novel"), 0)
wcNotes = checkInt(record.get("notes"), 0)
sIdle = checkInt(record.get("idle"), 0)
wcNovel = max(checkInt(record.get("novel"), 0), 0)
wcNotes = max(checkInt(record.get("notes"), 0), 0)
sIdle = max(checkInt(record.get("idle"), 0), 0)
tDiff = dEnd - dStart
sDiff = tDiff.total_seconds()