mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-13 11:30:59 +00:00
Improved implementation of usage_count_enabled
Thanks to @gasman for spotting
This commit is contained in:
parent
1ac807ce09
commit
de70f2ab89
1 changed files with 1 additions and 6 deletions
|
|
@ -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 a new issue