Fix duplicate checks (Bug #703149)

This commit is contained in:
Jon Tibble 2011-01-19 03:46:53 +00:00
parent 0f0234ba28
commit e41b6b1f06

View File

@ -171,10 +171,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
# not return False when nothing has changed (because this would # not return False when nothing has changed (because this would
# cause an error message later on). # cause an error message later on).
if edit: if edit:
if authors[0].id == new_author.id: for author in authors:
return True if author.id != new_author.id:
else: return False
return False return True
else: else:
return False return False
else: else:
@ -191,10 +191,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
# not return False when nothing has changed (because this would # not return False when nothing has changed (because this would
# cause an error message later on). # cause an error message later on).
if edit: if edit:
if topics[0].id == new_topic.id: for topic in topics:
return True if topics.id != new_topic.id:
else: return False
return False return True
else: else:
return False return False
else: else:
@ -212,10 +212,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
# not return False when nothing has changed (because this would # not return False when nothing has changed (because this would
# cause an error message later on). # cause an error message later on).
if edit: if edit:
if books[0].id == new_book.id: for book in books:
return True if books.id != new_book.id:
else: return False
return False return True
else: else:
return False return False
else: else: