mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 03:31:04 +01:00
Improved implementation of usage_count_enabled
Thanks to @gasman for spotting
This commit is contained in:
parent
1ac807ce09
commit
de70f2ab89
@ -126,9 +126,4 @@ def hook_output(hook_name):
|
||||
|
||||
@register.assignment_tag
|
||||
def usage_count_enabled():
|
||||
if hasattr(
|
||||
settings, 'WAGTAIL_USAGE_COUNT_ENABLED'
|
||||
) and settings.WAGTAIL_USAGE_COUNT_ENABLED:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return getattr(settings, 'WAGTAIL_USAGE_COUNT_ENABLED', False)
|
||||
|
Loading…
Reference in New Issue
Block a user