Log error if registry has no rattail config

not clear if this is even possible, but if so i want to know about it

trying to figure out the occasional error email we get, latest being
from collectd/curl pinging the /login page, but request.has_perm()
call fails with missing attr?!

seems like either the rattail config is empty, or else the subscriber
events aren't firing (in the correct order) ?
This commit is contained in:
Lance Edgar 2024-05-31 12:04:11 -05:00
parent 49cd050272
commit 9b88f01378
2 changed files with 5 additions and 2 deletions

View file

@ -132,8 +132,7 @@ def make_pyramid_config(settings, configure_csrf=True):
settings.setdefault('pyramid_deform.template_search_path', 'tailbone:templates/deform')
config = Configurator(settings=settings, root_factory=Root)
# add rattail config directly to registry
# TODO: why on earth do we do this again?
# add rattail config directly to registry, for access throughout the app
config.registry['rattail_config'] = rattail_config
# configure user authorization / authentication