query = query.filter(Sensors.timestamp >= begin)
if end is not None:
query = query.filter(Sensors.timestamp <= end)
- if mode == 'consolidated' and begin is None and end is None:
+ if mode == 'consolidated' and begin is not None and end is not None:
# copied from munin/master/_bin/munin-cgi-graph.in
# interval in seconds for data points
resolutions = dict(
query = query.filter(OpenWeatherMap.datetime >= begin)
if end is not None:
query = query.filter(OpenWeatherMap.datetime <= end)
- if mode == 'consolidated' and begin is None and end is None:
+ if mode == 'consolidated' and begin is not None and end is not None:
# copied from munin/master/_bin/munin-cgi-graph.in
# interval in seconds for data points
resolutions = dict(