Initialize context when it is none.
This commit is contained in:
1 parent
becea7d1b8
commit
377b8bd3fc
1 file changed
+2
@@ -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)):
|
||||
|
||||
Reference in new issue
Block a user