Ensure restrict to failed is never used when there are no failed ids

This commit is contained in:
Kovid Goyal 2016-01-28 20:57:53 +05:30
parent 1882395837
commit 4fbd66561e

View File

@ -269,6 +269,7 @@ class EditMetadataAction(InterfaceAction):
id_map = {} id_map = {}
restrict_to_failed = restrict_to_failed or bool(args and args[0]) 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: if restrict_to_failed:
db.data.set_marked_ids(failed_ids) db.data.set_marked_ids(failed_ids)