1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: prevent large difference between aggregated and recomputed summaries (resolve #354)

This commit is contained in:
Ferdinand Mütsch
2022-04-18 16:06:32 +02:00
parent 5276f68918
commit 91c765202c
2 changed files with 19 additions and 5 deletions

View File

@@ -390,7 +390,7 @@ func (srv *SummaryService) getMissingIntervals(from, to time.Time, summaries []*
// Between
for i := 0; i < len(summaries)-1; i++ {
t1, t2 := summaries[i].ToTime.T(), summaries[i+1].FromTime.T()
if t1.Equal(t2) || t1.Equal(to) || t1.After(to) { // TODO: check after
if t1.Equal(t2) || t1.Equal(to) || t1.After(to) {
continue
}