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(
179179 subset_definitions : Dict [str , Any ]
180180) -> Dict [str , FieldEntry ]:
181181 """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 ()
183188 for key , val in subset_definitions .items ():
189+ if key not in fields :
190+ continue
184191 retained_fields [key ]['field_details' ] = fields [key ]['field_details' ].copy ()
185192 for option in val :
186193 if option != 'fields' :
You can’t perform that action at this time.
0 commit comments