From aa2a57ef656ae0349d14ef555f46ccbc82161880 Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 28 Nov 2019 11:52:34 +0100 Subject: [PATCH] [#4801] Catch exception outside request context --- ckan/logic/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ckan/logic/__init__.py b/ckan/logic/__init__.py index 004c11e6810..844efa1f63b 100644 --- a/ckan/logic/__init__.py +++ b/ckan/logic/__init__.py @@ -232,6 +232,9 @@ def _prepopulate_context(context): except AttributeError: # c.user not set pass + except RuntimeError: + # Outside of request context + pass except TypeError: # c not registered pass