From e1155e4dab4a58027a324be2cb7be830ea593026 Mon Sep 17 00:00:00 2001 From: bch <> Date: Thu, 25 Jan 2007 07:25:39 +0000 Subject: [PATCH] Early error warning when the browse constructor is called with wrong record id bzr revid: bch-a7c9c4844f238e71edf1cf12cb90a5c5bbd5e70b --- bin/osv/orm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 97035a08abc..6cb7493f863 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -114,6 +114,7 @@ class browse_record_list(list): # class browse_record(object): def __init__(self, cr, uid, id, table, cache, context={}, list_class = None): + 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 self._uid = uid