From bdd54615ad597366ae3a3b783c141f7575e835a4 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 4 Dec 2013 11:26:47 +0100 Subject: [PATCH] Raise UseError on empty reason closes #1315 --- modules/ing/backend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ing/backend.py b/modules/ing/backend.py index 0b5dee72..69b41484 100644 --- a/modules/ing/backend.py +++ b/modules/ing/backend.py @@ -22,6 +22,7 @@ from weboob.capabilities.bank import ICapBank, AccountNotFound,\ Account, Recipient from weboob.capabilities.bill import ICapBill, Bill, Subscription,\ SubscriptionNotFound, BillNotFound +from weboob.capabilities.base import UserError from weboob.tools.backend import BaseBackend, BackendConfig from weboob.tools.value import ValueBackendPassword @@ -89,6 +90,8 @@ class INGBackend(BaseBackend, ICapBank, ICapBill): def transfer(self, account, recipient, amount, reason): with self.browser: + if not reason: + raise UserError('Reason is mandatory to do a transfer on ING website') if not isinstance(account, Account): account = self.get_account(account) if not isinstance(recipient, Recipient):