Skip to content

Commit

Permalink
[#3011] properly check for _datastore_only_resource
Browse files Browse the repository at this point in the history
  • Loading branch information
k-nut committed Jun 6, 2016
1 parent 218d6f4 commit ab64c77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ckanext/reclineview/plugin.py
Expand Up @@ -90,7 +90,7 @@ def can_view(self, data_dict):
resource = data_dict['resource']

if (resource.get('datastore_active') or
resource.get('url') == '_datastore_only_resource'):
'_datastore_only_resource' in resource.get('url', '')):
return True
resource_format = resource.get('format', None)
if resource_format:
Expand Down
2 changes: 1 addition & 1 deletion ckanext/reclineview/tests/test_view.py
Expand Up @@ -107,7 +107,7 @@ def teardown_class(cls):
def test_create_datastore_only_view(self):
dataset = factories.Dataset()
data = {
'resource': {'package_id': dataset['id'], 'format': 'csv'},
'resource': {'package_id': dataset['id']},
'fields': [{'id': 'a'}, {'id': 'b'}],
'records': [{'a': 1, 'b': 'xyz'}, {'a': 2, 'b': 'zzz'}]
}
Expand Down

0 comments on commit ab64c77

Please sign in to comment.