Skip to content
Snippets Groups Projects
Commit 7c191c06 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Handling NULL values in charts

parent 3320b7be
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ class ForecastResult:
the_value = forecast_result.all_values.get(result_parameter.getNamespaceKey(), "")
if the_value != "" and timeseries.get(result_parameter.getNamespaceKey(), None) != None:
try:
data_point = [util.get_unix_timestamp(forecast_result.valid_time_start),Decimal(the_value)]
data_point = [util.get_unix_timestamp(forecast_result.valid_time_start),Decimal(the_value) if the_value is not None else None]
timeseries[result_parameter.getNamespaceKey()]["data"].append(data_point)
except InvalidOperation:
continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment