[db.py] get_values will look in Singles if table not found.

This commit is contained in:
Rushabh Mehta 2013-07-02 11:22:46 +05:30
parent caccea65a4
commit 9b954300f9

View file

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