File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,15 @@ def extract_matching_fields(
179
179
subset_definitions : Dict [str , Any ]
180
180
) -> Dict [str , FieldEntry ]:
181
181
"""Removes fields that are not in the subset definition. Returns a copy without modifying the input fields dict."""
182
- retained_fields : Dict [str , FieldEntry ] = {x : fields [x ].copy () for x in subset_definitions }
182
+ retained_fields : Dict [str , FieldEntry ] = {}
183
+ for x in subset_definitions :
184
+ if x not in fields :
185
+ print ('{0} included in subset but has not been loaded' .format (x ))
186
+ else :
187
+ retained_fields [x ] = fields [x ].copy ()
183
188
for key , val in subset_definitions .items ():
189
+ if key not in fields :
190
+ continue
184
191
retained_fields [key ]['field_details' ] = fields [key ]['field_details' ].copy ()
185
192
for option in val :
186
193
if option != 'fields' :
You can’t perform that action at this time.
0 commit comments