diff --git a/ckanext/recombinant/logic.py b/ckanext/recombinant/logic.py index 4eb445e..2fdcaba 100644 --- a/ckanext/recombinant/logic.py +++ b/ckanext/recombinant/logic.py @@ -378,15 +378,11 @@ def datastore_fields(fs, text_types): """ return the datastore field definitions for fields fs """ - ds_fields = [] - for f in fs: - # exclude Published Resource fields from the Recombinant Resource DataStore - if f.get('published_resource_computed_field', False): - continue - ds_fields.append({ - 'id': f['datastore_id'], - 'type': datastore_column_type(f['datastore_type'], text_types)}) - return ds_fields + return [{ + 'id': f['datastore_id'], + 'type': datastore_column_type(f['datastore_type'], text_types)} + for f in fs + if not f.get('published_resource_computed_field', False)] def _datastore_match(fs, fields):