From 936535d625070f55fc5d8f37eccad03d9d2778c0 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 19 Nov 2016 18:56:09 -0600 Subject: [PATCH] Tweak core view's rattail config init logic, for tests --- tailbone/views/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tailbone/views/core.py b/tailbone/views/core.py index f39cdc92..0b793702 100644 --- a/tailbone/views/core.py +++ b/tailbone/views/core.py @@ -41,14 +41,16 @@ class View(object): def __init__(self, request): self.request = request - self.enum = self.rattail_config.get_enum() + config = self.rattail_config + if config: + self.enum = config.get_enum() @property def rattail_config(self): """ Reference to the effective Rattail config object. """ - return self.request.rattail_config + return getattr(self.request, 'rattail_config', None) def late_login_user(self): """