From f1d807bf6d6b998e47e16ccfdd13820a8192b80a Mon Sep 17 00:00:00 2001 From: Tanner Prestegard <tanner.prestegard@ligo.org> Date: Tue, 3 Apr 2018 12:40:02 -0500 Subject: [PATCH] small change to how custom reverse function works --- gracedb/events/view_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gracedb/events/view_utils.py b/gracedb/events/view_utils.py index ee8fcfd6d..49ce39446 100644 --- a/gracedb/events/view_utils.py +++ b/gracedb/events/view_utils.py @@ -104,7 +104,7 @@ def reverse(name, *args, **kw): # This probably only works if you give app_names which are the same # and namespaces that are different. - if 'request' in kw and 'current_app' not in kw: + if kw.get('request', None) is not None and 'current_app' not in kw: request = kw['request'] # For some reason, resolve() does not seem to like the script_prefix. # So, remove it. -- GitLab