From 0c4f1da5abc30ec04a988b5d637d1a6de9fc208b Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Sun, 15 Nov 2015 04:16:58 +0100 Subject: [PATCH] don't error out if there are no attachments --- account_bank_statement_import_save_file/hooks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/account_bank_statement_import_save_file/hooks.py b/account_bank_statement_import_save_file/hooks.py index 908c225..2681073 100644 --- a/account_bank_statement_import_save_file/hooks.py +++ b/account_bank_statement_import_save_file/hooks.py @@ -56,6 +56,9 @@ def _post_init_hook_migrate_account_banking_imported_file(cr, pool): attachment_ids = [attachment_id for attachment_id, in cr.fetchall()] + if not attachment_ids: + return + # assign respective attachment to all statements pointing to an imported # banking file cr.execute(