From e2ea5775e0c405485eeede662fb124831f7fa534 Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Tue, 14 Apr 2020 11:58:09 +0200 Subject: [PATCH] alternative way to make author_text --- simplelayout.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/simplelayout.py b/simplelayout.py index ec885b2..f67a0f7 100644 --- a/simplelayout.py +++ b/simplelayout.py @@ -41,9 +41,10 @@ for book in session.query(Book).all(): author_text = "" for author in book.authors: if not first: - text += ", " - author_text += "{}".format(author.name) + author_text += ", " + author_text += author.name first = False + author_text = "{}".format(author_text) #if all_authors==['John Markoff']: # import ipdb; ipdb.set_trace()