From 83139590f97469d1326c94933491a0a28c5df30d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 16 Apr 2012 11:22:24 +0530 Subject: [PATCH] Do not allow author names to be set to blank via the Manage authors function. Blank authors are now automatically set to 'Unknown' --- src/calibre/library/database2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 47bde01a81..1dc0ce45ed 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -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