From 377b8bd3fc50a9a7690ca27ce2d5b5414ea7d92b Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Sat, 14 Jun 2008 01:30:18 +0200 Subject: [PATCH] Initialize context when it is none. --- currency.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/currency.py b/currency.py index 8e767097ff..9db843abff 100644 --- a/currency.py +++ b/currency.py @@ -90,6 +90,8 @@ class Currency(OSV): Return the amount to the new currency Use the rate of the date of the context or the current date ''' + if context is None: + context = {} if isinstance(from_currency, (int, long)): from_currency = self.browse(cursor, user, from_currency, context=context) if isinstance(to_currency, (int, long)):