Early error warning when the browse constructor is called with wrong record id

bzr revid: bch-a7c9c4844f238e71edf1cf12cb90a5c5bbd5e70b
This commit is contained in:
bch 2007-01-25 07:25:39 +00:00
parent b4af1461c4
commit e1155e4dab
1 changed files with 1 additions and 0 deletions

View File

@ -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