Tweak config handling in case of running tests
This commit is contained in:
parent
0b68d56ddb
commit
d9569882c9
|
@ -1808,7 +1808,7 @@ class MasterView(View):
|
||||||
permission='{}.view'.format(permission_prefix))
|
permission='{}.view'.format(permission_prefix))
|
||||||
|
|
||||||
# version history
|
# version history
|
||||||
if cls.has_versions and rattail_config.versioning_enabled():
|
if cls.has_versions and rattail_config and rattail_config.versioning_enabled():
|
||||||
config.add_tailbone_permission(permission_prefix, '{}.versions'.format(permission_prefix),
|
config.add_tailbone_permission(permission_prefix, '{}.versions'.format(permission_prefix),
|
||||||
"View version history for {}".format(model_title))
|
"View version history for {}".format(model_title))
|
||||||
config.add_route('{}.versions'.format(route_prefix), '{}/{{{}}}/versions/'.format(url_prefix, model_key))
|
config.add_route('{}.versions'.format(route_prefix), '{}/{{{}}}/versions/'.format(url_prefix, model_key))
|
||||||
|
|
Loading…
Reference in a new issue