diff --git a/tailbone/views/common.py b/tailbone/views/common.py index f72b01e4..98dfd6ce 100644 --- a/tailbone/views/common.py +++ b/tailbone/views/common.py @@ -117,13 +117,13 @@ class CommonView(View): @classmethod def defaults(cls, config): - rattail_config = config.registry.settings['rattail_config'] + rattail_config = config.registry.settings.get('rattail_config') # auto-correct URLs which require trailing slash config.add_notfound_view(cls, attr='notfound', append_slash=True) # exception - if rattail_config.production(): + if rattail_config and rattail_config.production(): config.add_exception_view(cls, attr='exception', renderer='/exception.mako') # home