Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
abulojoshua1 authored and etj committed Sep 24, 2020
1 parent bcaab92 commit 4aa96c5
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ckanext/faoclh/helpers/report_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from ckan.plugins import toolkit as t
from ckan.lib.i18n import get_lang
from ckanext.gsreport.reports import EMPTY_STRING_PLACEHOLDER
from ckan import model

try:
Expand All @@ -23,29 +22,6 @@
cache = CacheManager(type='memory')


def facets_hide_item(item):
"""
Return False if facet item should be hidden from rendering in list
"""
return item['name'] == EMPTY_STRING_PLACEHOLDER


def get_organizations():
"""
Return list of tuples with (org name, org title) with localized names
"""
org_list = t.get_action('organization_list')
ctx = {'for_view': True,
'user_is_admin': True,
'metadata_modified': '',
'with_private': True}

data_dict = {'all_fields': True,
'include_dataset_count': False}

for org in org_list(ctx, data_dict):
yield (org['name'], org['title'],)

@cache.cache('localized_org_title', expire=30)
def get_localized_org_title(org_name, lang):
"""
Expand Down

0 comments on commit 4aa96c5

Please sign in to comment.