Do not allow author names to be set to blank via the Manage authors function. Blank authors are now automatically set to 'Unknown'

This commit is contained in:
Kovid Goyal 2012-04-16 11:22:24 +05:30
parent 293b270066
commit 83139590f9

View File

@ -2653,6 +2653,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
def rename_author(self, old_id, new_name):
# Make sure that any commas in new_name are changed to '|'!
new_name = new_name.replace(',', '|').strip()
if not new_name:
new_name = _('Unknown')
# Get the list of books we must fix up, one way or the other
# Save the list so we can use it twice