Skip to content

Commit

Permalink
Added None check in stat-tables.inc. GH-256
Browse files Browse the repository at this point in the history
  • Loading branch information
Daveiano committed Mar 4, 2024
1 parent 1cdd750 commit b56b5fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -928,3 +928,5 @@ index 465d4ad..aa8bad6 100644
- GH-181 [BUG] xAxis: Date mismatch in combined charts. Especially when using cumulative aggregation. Feel free to comment if you have more infos, or also noticed this issue.

# Next

- Bugfix: Reason: '<' not supported between instances of 'NoneType' and 'float' in the skins/weewx-wdc/year-%Y.html.tmpl file GH-256
8 changes: 5 additions & 3 deletions skins/weewx-wdc/includes/stat-table.inc
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@
#set $stat_month = $get_stat_table_month_obs($time_span_start_ts, $time_span_end_ts)
#set $raw_value = $getattr($getattr($stat_month, $stat_table_obs), $agg_for_value).raw

#silent $per_month[$month].append($raw_value)
#silent $per_year[$year].append($raw_value)
#silent $per_all.append($raw_value)
#if $raw_value is not None
#silent $per_month[$month].append($raw_value)
#silent $per_year[$year].append($raw_value)
#silent $per_all.append($raw_value)
#end if

<bx-structured-list-cell data-testid="month-$month_from_range-$agg-$stat_table_obs">
$getattr($getattr($stat_month, $stat_table_obs), $agg_for_value)
Expand Down

0 comments on commit b56b5fc

Please sign in to comment.