From ba8245bfe4206a725dff7eb4f18b37ecc59b078a Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Sun, 7 Mar 2021 21:21:37 +0100 Subject: [PATCH] Fix include_journals=False --- app/db.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/db.py b/app/db.py index d975a3a65..ead43169b 100644 --- a/app/db.py +++ b/app/db.py @@ -96,15 +96,12 @@ class Graph: # then we iterate over its values and construct nodes for each list of subnodes. nodes = {} for wikilink in wikilink_to_subnodes: + if not include_journals and util.is_journal(wikilink): + pass node = Node(wikilink) node.subnodes = wikilink_to_subnodes[wikilink] nodes[wikilink] = node - # remove journals if so desired. - # if not include_journals: - # nodes = [node for node in nodes if not util.is_journal(node.wikilink)] - - current_app.logger.debug('*** Graph loaded.') return nodes # TODO: experiment with other ranking.