From bd5f382b05dbf3225d02988149c50c0e6d666170 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 2 Oct 2016 14:19:33 +0200 Subject: formatRefs: Remove empty parent nodes --- tools/formatRefs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/formatRefs.py b/tools/formatRefs.py index 303de05..f82705e 100755 --- a/tools/formatRefs.py +++ b/tools/formatRefs.py @@ -122,7 +122,7 @@ if __name__ == '__main__': # where can we find it? (print) # print from root to ref (i.e. magazine, volume, issue) parents = reversed (list (getRecursiveAll (s, g, ref, s.isPartOf))) - where = [formatParent (s, g, p) for p in parents] + where = list (filter (lambda x: x, [formatParent (s, g, p) for p in parents])) thiswhere = formatParent (s, g, ref, False) if thiswhere: where.append (thiswhere) -- cgit v1.2.3