From 9b954300f9eaaafe2ede9a4a4e3dd87ec46f6931 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 2 Jul 2013 11:22:46 +0530 Subject: [PATCH] [db.py] get_values will look in Singles if table not found. --- webnotes/db.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webnotes/db.py b/webnotes/db.py index 536c7e2a36..903368ffd1 100644 --- a/webnotes/db.py +++ b/webnotes/db.py @@ -324,7 +324,11 @@ class Database: return self.get_values_from_table(fields, filters, doctype, as_dict, debug) except Exception, e: if ignore and e.args[0] in (1146, 1054): + # table or column not found, return None return None + elif (not ignore) and e.args[0]==1146: + # table not found, look in singles + pass else: raise e