commit 3c82489f87ba45469e61fc752a7d34885fba7948
parent 4344303939442384941f6b8d84a40e03b200367d
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Thu, 21 Mar 2024 14:46:27 -0700
Don't show the current period in the archive page
This also caused an incorrect assertion where the end time was not
set in some cases.
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/pages/archive.c b/pages/archive.c
@@ -38,6 +38,14 @@ showperiod(struct pagedata *pd, struct timesheet **rts)
unsigned int count;
ts = *rts;
+
+ if (!ts->period) {
+ while (ts && !ts->period)
+ ts = ts->next;
+ *rts = ts;
+ return KCGI_OK;
+ }
+
assert(ts->set & StartTimeFlag);
from = ts->times[StartTime];