mirror of
https://github.com/flancian/garden.git
synced 2026-08-07 23:16:21 +00:00
Fix include_journals=False
This commit is contained in:
@@ -96,15 +96,12 @@ class Graph:
|
|||||||
# then we iterate over its values and construct nodes for each list of subnodes.
|
# then we iterate over its values and construct nodes for each list of subnodes.
|
||||||
nodes = {}
|
nodes = {}
|
||||||
for wikilink in wikilink_to_subnodes:
|
for wikilink in wikilink_to_subnodes:
|
||||||
|
if not include_journals and util.is_journal(wikilink):
|
||||||
|
pass
|
||||||
node = Node(wikilink)
|
node = Node(wikilink)
|
||||||
node.subnodes = wikilink_to_subnodes[wikilink]
|
node.subnodes = wikilink_to_subnodes[wikilink]
|
||||||
nodes[wikilink] = node
|
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.')
|
current_app.logger.debug('*** Graph loaded.')
|
||||||
return nodes
|
return nodes
|
||||||
# TODO: experiment with other ranking.
|
# TODO: experiment with other ranking.
|
||||||
|
|||||||
Reference in New Issue
Block a user