From 936558779bd7cb9aeed64445afff65ce2a3ef047 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 6 Feb 2022 18:28:35 +0100 Subject: [PATCH] smol bug fix --- caliGraph.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/caliGraph.py b/caliGraph.py index 8865975..f72f72f 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -818,7 +818,12 @@ def recommenderCompetence(G): for n in list(G.nodes): node = G.nodes[n] if node['t'] == 'recommender': - node['score'] -= node['se'] * 1 + if 'se' in node: + node['score'] -= node['se'] * 1 + else: + if not node['score']: + node['score'] = 0 + node['score'] /= 2 def readBooksAnalysis(G, minRating=0, showAllTags=True, removeUnconnected=False, removeTopListsB=True): removeUnread(G)