Skip to content

Commit

Permalink
BUGFIX: Prevent KeyError: 'type'
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceksan committed Mar 6, 2023
1 parent aa6ac2e commit f6b16c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target_snowflake/stream_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def reset_new_value(record: Dict, key: str, _format: str):
reset_new_value(record, key, type_dict['format'])
break
else:
if 'string' in schema['properties'][key]['type'] and \
if 'type' in schema['properties'][key] and 'string' in schema['properties'][key]['type'] and \
schema['properties'][key].get('format', None) in {'date-time', 'time', 'date'}:
reset_new_value(record, key, schema['properties'][key]['format'])

Expand Down

0 comments on commit f6b16c5

Please sign in to comment.