fix: handle case when table does not exist in the database

Signed-off-by: Chinmay D. Pai <chinmay.pai@zerodha.com>
This commit is contained in:
Chinmay D. Pai 2021-01-11 14:40:24 +05:30
parent 66016ea76c
commit 5830cdbd96
No known key found for this signature in database
GPG key ID: 75507BE256F40CED

View file

@ -312,7 +312,7 @@ def get_stats(stats, doctype, filters=[]):
try:
columns = frappe.db.get_table_columns(doctype)
except (frappe.db.InternalError, Exception):
except (frappe.db.InternalError, frappe.db.ProgrammingError):
# raised when _user_tags column is added on the fly
# raised if its a virtual doctype
columns = []