From 08933b02004cf1843e5bbf2bdde86e9806c88f0e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 27 Oct 2008 14:59:31 +0100 Subject: [PATCH] browse_null objects doesn't fail anymore when accessing its attributes bzr revid: chs@tinyerp.com-20081027135931-2772tugct3p1u3rx --- bin/osv/orm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 62d414c1eb3..554006565a0 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -90,6 +90,9 @@ class browse_null(object): def __getitem__(self, name): return False + def __getattr__(self, name): + return False # XXX: return self ? + def __int__(self): return False