Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 784b5f1

Browse files
committed
[#2770] Return default error page on fanstatic errors
1 parent e220f44 commit 784b5f1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ckan/controllers/error.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def document(self):
3030
if not original_response:
3131
return 'There is no error.'
3232
# Bypass error template for API operations.
33-
if original_request and original_request.path.startswith('/api'):
33+
if (original_request and
34+
(original_request.path.startswith('/api') or
35+
original_request.path.startswith('/fanstatic'))):
3436
return original_response.body
3537
# Otherwise, decorate original response with error template.
3638
c.content = literal(original_response.unicode_body) or \

0 commit comments

Comments
 (0)