fixed bug with set_cookie
This commit is contained in:
parent
39b00701c3
commit
370852367c
2 changed files with 2 additions and 1 deletions
|
|
@ -125,6 +125,7 @@ class ConcentrationModel(BaseRequestHandler):
|
|||
# Re-generate the report with the conditional probability of infection plot
|
||||
if self.get_cookie('conditional_plot'):
|
||||
form.conditional_probability_plot = True if self.get_cookie('conditional_plot') == '1' else False
|
||||
self.clear_cookie('conditional_plot') # Clears cookie after changing the form value.
|
||||
report_task = executor.submit(
|
||||
report_generator.build_report, base_url, form,
|
||||
executor_factory=functools.partial(
|
||||
|
|
|
|||
|
|
@ -1082,10 +1082,10 @@ function conditional_probability_plot(value, is_generated) {
|
|||
else if (value && is_generated == 0) {
|
||||
document.getElementById('label_conditional_probability_plot').innerHTML = `<span id="loading_spinner" class="spinner-border spinner-border-sm mr-2 mt-0" role="status" aria-hidden="true"></span>Loading...`;
|
||||
document.getElementById('conditional_probability_plot').setAttribute('disabled', true);
|
||||
document.cookie = `conditional_plot= 1; path=/`;
|
||||
window.location.reload();
|
||||
}
|
||||
else document.getElementById('conditional_probability_div').style.display = "none";
|
||||
document.cookie = `conditional_plot= ${+value}; path=/`;
|
||||
}
|
||||
|
||||
function export_csv() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue