Skip to content

Commit

Permalink
Handle malformed entries in P&L
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyyid committed May 25, 2021
1 parent 2609d19 commit f827a09
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_version():
readme = f.read()

setup(name='tap-quickbooks',
version='1.4.34',
version='1.4.35',
description='Singer.io tap for extracting data from the Quickbooks API',
author='hotglue',
url='http://hotglue.xyz/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def sync(self, catalog_entry):
# Zip columns and row data.
for raw_row in output:
row = dict(zip(columns, raw_row))
if not row.get("Amount"):
# If a row is missing the amount, skip it
continue

cleansed_row = {}
for k, v in row.items():
if v == "":
Expand Down Expand Up @@ -133,6 +137,10 @@ def sync(self, catalog_entry):
# Zip columns and row data.
for raw_row in output:
row = dict(zip(columns, raw_row))
if not row.get("Amount"):
# If a row is missing the amount, skip it
continue

cleansed_row = {}
for k, v in row.items():
if v == "":
Expand Down

0 comments on commit f827a09

Please sign in to comment.