From 6ded721da47bc7cbfb937a2b6084221d9b093a0f Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Tue, 18 Jun 2019 18:56:50 +0530 Subject: [PATCH 1/3] fix: Assign exception_type only if exception name available --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 9721ed9b08..7872a667d4 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -340,7 +340,7 @@ def msgprint(msg, title=None, raise_exception=0, as_table=False, indicator=None, message_log.append(json.dumps(out)) - if raise_exception: + if raise_exception and raise_exception.get('__name__'): local.response['exc_type'] = raise_exception.__name__ _raise_exception() From 8fac5820829853d18464d5339f80fd6341b760a1 Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Tue, 18 Jun 2019 19:20:34 +0530 Subject: [PATCH 2/3] fix: Use hasattr instead of get --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index 7872a667d4..d4bade75a8 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -340,7 +340,7 @@ def msgprint(msg, title=None, raise_exception=0, as_table=False, indicator=None, message_log.append(json.dumps(out)) - if raise_exception and raise_exception.get('__name__'): + if raise_exception and hasattr(raise_exception, '__name__'): local.response['exc_type'] = raise_exception.__name__ _raise_exception() From b6c56ff94f7035581ec35b318d4a07326c8c4e73 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 19 Jun 2019 11:18:57 +0530 Subject: [PATCH 3/3] fix(postres): Pass tuple of all_ids instead of an array - Fixes failing build for postgres --- frappe/email/queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/queue.py b/frappe/email/queue.py index b671dc91d8..6b6b006670 100755 --- a/frappe/email/queue.py +++ b/frappe/email/queue.py @@ -80,7 +80,7 @@ def send(recipients=None, sender=None, subject=None, message=None, text_content= recipients = list(set(recipients)) cc = list(set(cc)) - all_ids = recipients + cc + all_ids = tuple(recipients + cc) unsubscribed = frappe.db.sql_list(''' SELECT