From 0e8e28ef6cf26691110bc3df56703d002da376b3 Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 26 Jul 2007 08:32:37 +0000 Subject: [PATCH] kernel: fix context bzr revid: ced-07f25fbd1709a44913b83a24b9b2528e9f69a24e --- bin/osv/orm.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index ec77db4b6ba..5682b327e76 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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