From 3d23f6e3e2af67fe87c62d788918b13b59b5c477 Mon Sep 17 00:00:00 2001 From: David Lai Date: Mon, 8 Jul 2019 20:52:56 +0800 Subject: [PATCH] Ensure `node` is not `None` --- avalon/tools/cbloader/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avalon/tools/cbloader/app.py b/avalon/tools/cbloader/app.py index e490a6a75..a8e0a79e4 100644 --- a/avalon/tools/cbloader/app.py +++ b/avalon/tools/cbloader/app.py @@ -204,7 +204,7 @@ def _versionschanged(self): rows = selection.selectedRows(column=active.column()) if active in rows: node = active.data(subsets.model.NodeRole) - if not node.get("isGroup"): + if node is not None and not node.get("isGroup"): version = node['version_document']['_id'] self.data['model']['version'].set_version(version)