From a3fe6a602732d84be3e32b0a23eb281ec7ad278b 2014-11-12 19:49:38 From: Thomas Kluyver Date: 2014-11-12 19:49:38 Subject: [PATCH] Merge pull request #6908 from minrk/del-comm-id handle setting Widget.comm = None --- diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index 0eccf42..5a398fc 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -175,7 +175,8 @@ class Widget(LoggingConfigurable): def _comm_changed(self, name, new): """Called when the comm is changed.""" - self.comm = new + if new is None: + return self._model_id = self.model_id self.comm.on_msg(self._handle_msg)