Do not add the entry attribute to songbooks when there is no song number.

bzr-revno: 1289
This commit is contained in:
Andreas Preikschat 2011-02-10 19:46:27 +00:00 committed by Jon Tibble
commit 63d4842da5
1 changed files with 2 additions and 1 deletions

View File

@ -263,7 +263,8 @@ class OpenLyrics(object):
songbooks = etree.SubElement(properties, u'songbooks')
element = self._add_text_to_element(
u'songbook', songbooks, None, book)
element.set(u'entry', song.song_number)
if song.song_number:
element.set(u'entry', song.song_number)
if song.topics:
themes = etree.SubElement(properties, u'themes')
for topic in song.topics: