X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fscreens%2Fmainscreen.py;h=df110c64a95554feb25642445b8340626464a466;hp=988d608703e0f9d5bbd06dea8f61b9096459d7be;hb=bc9cce47260c4847c2c613548ca3b2e0eaa6b510;hpb=c27cbd1c037ce1f16caa0e43f58794bb1250e6e7 diff --git a/sface/screens/mainscreen.py b/sface/screens/mainscreen.py index 988d608..df110c6 100644 --- a/sface/screens/mainscreen.py +++ b/sface/screens/mainscreen.py @@ -75,6 +75,11 @@ class NodeView(QTreeView): def toggleSelection(self): index = self.currentIndex() model = index.model() + + if (model == None): + # probably no rspec downloaded yet + return + status_index = model.index(index.row(), MEMBERSHIP_STATUS_COLUMN, index.parent()) status_data = status_index.data().toString() node_index = model.index(index.row(), NAME_COLUMN, index.parent()) @@ -125,6 +130,11 @@ class NodeView(QTreeView): # Right click index = self.currentIndex() model = index.model() + + if (model == None): + # probably no rspec downloaded yet + return + status_index = model.index(index.row(), 1, index.parent()) status_data = status_index.data().toString() node_index = model.index(index.row(), 0, index.parent())