mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Fixed clearing temperature profile throwing error when going back to analyze page
This commit is contained in:
parent
2c591556ad
commit
c7fbefcf2e
@ -91,13 +91,9 @@ beestat.component.card.temperature_profiles.prototype.get_data_ = function() {
|
||||
};
|
||||
|
||||
if (
|
||||
this.fetching_data_ !== true &&
|
||||
(
|
||||
thermostat.profile === null ||
|
||||
moment().diff(moment(thermostat.profile.metadata.generated_at), 'days') >= 7
|
||||
)
|
||||
) {
|
||||
this.fetching_data_ = true;
|
||||
this.show_loading_('Fetching');
|
||||
new beestat.api()
|
||||
.add_call(
|
||||
@ -118,7 +114,6 @@ beestat.component.card.temperature_profiles.prototype.get_data_ = function() {
|
||||
'thermostat'
|
||||
)
|
||||
.set_callback(function(response) {
|
||||
self.fetching_data_ = false;
|
||||
beestat.cache.set('thermostat', response.thermostat);
|
||||
})
|
||||
.send();
|
||||
|
Loading…
x
Reference in New Issue
Block a user