From acd924b4266ecceb33fd7e9228de7213aeee9ad2 Mon Sep 17 00:00:00 2001 From: Jesse Vickery <97247789+JVickery-TBS@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:41:45 -0400 Subject: [PATCH] Update ckanext/recombinant/logic.py Co-authored-by: Ian Ward --- ckanext/recombinant/logic.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) 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):