Skip to content

Commit

Permalink
Handle missing entries in fixed_headers
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyyid committed May 20, 2021
1 parent 12b871f commit 52b2f7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='target-csv',
version='0.3.2',
version='0.3.3',
description='Singer.io target for writing CSV files',
author='Stitch',
url='https://singer.io',
Expand Down
2 changes: 1 addition & 1 deletion target_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def persist_messages(delimiter, quotechar, messages, destination_path, fixed_hea
# flattened_record = flatten(o['record'])
flattened_record = o['record']

if fixed_headers is not None:
if fixed_headers is not None and o['stream'] in fixed_headers:
if o['stream'] not in headers:
headers[o['stream']] = fixed_headers[o['stream']]
else:
Expand Down

0 comments on commit 52b2f7f

Please sign in to comment.