From fcda6727ece73413788e8f90bf95e36156f11f8e Mon Sep 17 00:00:00 2001 From: Lukasz Mitusinski Date: Tue, 13 Mar 2018 14:00:40 +0100 Subject: [PATCH] #751 update widget state on execution --- nbconvert/preprocessors/execute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbconvert/preprocessors/execute.py b/nbconvert/preprocessors/execute.py index 2a8aa3a64..382b336e7 100644 --- a/nbconvert/preprocessors/execute.py +++ b/nbconvert/preprocessors/execute.py @@ -489,7 +489,7 @@ def run_cell(self, cell, cell_index=0): cell_map[cell_index] = [] continue elif msg_type.startswith('comm'): - self.widget_state[content['comm_id']] = content['data']['state'] + self.widget_state.setdefault(content['comm_id'], {}).update(content['data']['state']) continue display_id = None