Permalink
Browse files

* avoid empty descriptions in template

  • Loading branch information...
1 parent 9eff58f commit 13cd48bb82fa9a5fff6946735383a6e207c2ab3b @erlehmann erlehmann committed Sep 28, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 helpers/template.py
View
@@ -45,8 +45,9 @@ def page(article_doi, article_pmid, article_pmcid, authors, article_title, journ
description = _escape(caption) # title useless, not using it
else:
description = "%s %s" % (_escape(title), _escape(caption))
- assert len(description) > 0
- text += "|Description=\n{{en|1=%s}}\n" % description
+ text += "|Description=\n"
+ if len(description) > 0:
+ text+= "{{en|1=%s}}\n" % description
text += "|Date= %s\n" % make_datestring(article_year, article_month, article_day)
if label:
text += "|Source= %s from " % _escape(label)

0 comments on commit 13cd48b

Please sign in to comment.