From 4fbd66561e3a32c5311e4bdfea48f84ab47e133c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 28 Jan 2016 20:57:53 +0530 Subject: [PATCH] Ensure restrict to failed is never used when there are no failed ids --- src/calibre/gui2/actions/edit_metadata.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/actions/edit_metadata.py b/src/calibre/gui2/actions/edit_metadata.py index cbf7e3ab7e..33404e155e 100644 --- a/src/calibre/gui2/actions/edit_metadata.py +++ b/src/calibre/gui2/actions/edit_metadata.py @@ -269,6 +269,7 @@ class EditMetadataAction(InterfaceAction): id_map = {} restrict_to_failed = restrict_to_failed or bool(args and args[0]) + restrict_to_failed = restrict_to_failed and bool(failed_ids) if restrict_to_failed: db.data.set_marked_ids(failed_ids)