← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/bugs into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)


Fix song import for missing authors as songs can be saved without them!
-- 
https://code.launchpad.net/~trb143/openlp/bugs/+merge/43421
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2010-11-30 20:23:21 +0000
+++ openlp/plugins/songs/lib/xml.py	2010-12-11 10:48:54 +0000
@@ -346,8 +346,12 @@
         song.comments = u''
         song.song_number = u''
         # Process Authors
-        for author in properties.authors.author:
-            self._process_author(author.text, song)
+        try:
+            for author in properties.authors.author:
+                self._process_author(author.text, song)
+        except:
+            # No Author in XML so ignore
+            pass
         self.manager.save_object(song)
         return song.id
 


Follow ups