kernel: fix context

bzr revid: ced-07f25fbd1709a44913b83a24b9b2528e9f69a24e
This commit is contained in:
ced
2007-07-26 08:32:37 +00:00
parent 6507e6c29a
commit 0e8e28ef6c
+6 -2
View File
@@ -110,7 +110,9 @@ class browse_null(object):
#
class browse_record_list(list):
def __init__(self, lst, context={}):
def __init__(self, lst, context=None):
if not context:
context = {}
super(browse_record_list, self).__init__(lst)
self.context = context
@@ -120,7 +122,9 @@ class browse_record_list(list):
# default to : browse_record_list
#
class browse_record(object):
def __init__(self, cr, uid, id, table, cache, context={}, list_class = None):
def __init__(self, cr, uid, id, table, cache, context=None, list_class = None):
if not context:
context = {}
assert id, 'Wrong ID for the browse record, got '+str(id)+ ', expected an integer.'
self._list_class = list_class or browse_record_list
self._cr = cr