Initialize context when it is none.

This commit is contained in:
Bertrand Chenal committed 2008-06-14 01:30:18 +02:00
1 parent becea7d1b8
commit 377b8bd3fc
1 file changed
+2
+2
View File
@@ -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)):