1
0
mirror of https://github.com/beestat/app.git synced 2025-07-09 03:04:07 -04:00

Fixed #195 - Runtime Detail gets stuck when end date range is today

This commit is contained in:
Jon Ziebell 2019-12-16 22:27:00 -05:00
parent 7adfcb4b34
commit f0a8f24b59

View File

@ -72,11 +72,18 @@ beestat.component.card.runtime_detail.prototype.decorate_contents_ = function(pa
); );
} }
// Don't go before there's data.
required_begin = moment.max( required_begin = moment.max(
required_begin, required_begin,
moment(thermostat.first_connected) moment(thermostat.first_connected)
); );
// Don't go after now.
required_end = moment.min(
required_end,
moment().subtract(1, 'hour')
);
/** /**
* If the needed data exists in the database and the runtime_thermostat * If the needed data exists in the database and the runtime_thermostat
* cache is empty, then query the data. If the needed data does not exist in * cache is empty, then query the data. If the needed data does not exist in