diff --git a/ckanext/nhs/helpers.py b/ckanext/nhs/helpers.py index a7ba2e8..96f8039 100644 --- a/ckanext/nhs/helpers.py +++ b/ckanext/nhs/helpers.py @@ -148,7 +148,7 @@ def get_latest_resources(): and_(model.Package.state == 'active', model.Package.private == False, model.Resource.state == 'active', - text("resource.extras ILIKE \'%s\'" % (private_resource_dict)) + text("resource.extras ILIKE \'%s\' or resource.extras ILIKE \'%s\' " % (private_resource_dict, '%{level: public}%' )) ) ).order_by("latest DESC").limit(5) q_result = model.Session.execute(sql).fetchall()