cmd/ursrv: Fix broken block transfer chart

This commit is contained in:
Jakob Borg
2023-01-31 09:09:36 +01:00
parent dc6d695c00
commit 5a50de1154
2 changed files with 18 additions and 14 deletions
+4
View File
@@ -1133,6 +1133,10 @@ func getBlockStats(db *sql.DB) ([][]interface{}, error) {
if err != nil {
return nil, err
}
// Legacy bad data on certain days
if reports <= 0 || pulled < 0 || renamed < 0 || reused < 0 || copyOrigin < 0 || copyOriginShifted < 0 || copyElsewhere < 0 {
continue
}
row := []interface{}{
day.Format("2006-01-02"),
reports,