← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/trivialfixes into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46742

Fix duplicate checks (Bug #703149)

(An explanation has been added to the bug report for more information)
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46742
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py	2011-01-15 20:06:25 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py	2011-01-19 03:54:11 +0000
@@ -171,10 +171,10 @@
             # not return False when nothing has changed (because this would
             # cause an error message later on).
             if edit:
-                if authors[0].id == new_author.id:
-                    return True
-                else:
-                    return False
+                for author in authors:
+                    if author.id != new_author.id:
+                        return False
+                return True
             else:
                 return False
         else:
@@ -191,10 +191,10 @@
             # not return False when nothing has changed (because this would
             # cause an error message later on).
             if edit:
-                if topics[0].id == new_topic.id:
-                    return True
-                else:
-                    return False
+                for topic in topics:
+                    if topics.id != new_topic.id:
+                        return False
+                return True
             else:
                 return False
         else:
@@ -212,10 +212,10 @@
             # not return False when nothing has changed (because this would
             # cause an error message later on).
             if edit:
-                if books[0].id == new_book.id:
-                    return True
-                else:
-                    return False
+                for book in books:
+                    if books.id != new_book.id:
+                        return False
+                return True
             else:
                 return False
         else: