Skip to content

Commit 93b2fb4

Browse files
authored
Merge pull request #169 from hvraven/statistics-double-count-fix
fix double counting bug in statistics overview
2 parents 281fd99 + 8d5d3c1 commit 93b2fb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

octoprint_PrintJobHistory/DatabaseManager.py

+4
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,10 @@ def calculatePrintJobsStatisticByQuery(self, tableQuery):
555555
allFilaments = job.getFilamentModels()
556556
if allFilaments != None:
557557
for filla in allFilaments:
558+
if filla.toolId == "total":
559+
# exclude totals, otherwise everything is counted twice
560+
continue
561+
558562
if (StringUtils.isEmpty(filla.usedLength) == False):
559563
length = length + filla.usedLength
560564
if (StringUtils.isEmpty(filla.usedWeight) == False):

0 commit comments

Comments
 (0)