Skip to content

Commit

Permalink
👔 fix(supplier): Handle null-tax-ID
Browse files Browse the repository at this point in the history
  • Loading branch information
kiloreven committed Jan 24, 2024
1 parent 38ee235 commit 097c79c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oda_wd_client/service/resource_management/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def workday_supplier_to_pydantic(data: dict) -> Supplier:
primary_tax_id = None
tax_id_data = sup_data.get("Tax_ID_Widget_Data", {}).get("Tax_ID_Data", [])
for item in tax_id_data:
if item["Primary_Tax_ID"]:
# We can get a widget data item that has no Tax ID Text attribute
if item["Primary_Tax_ID"] and "Tax_ID_Text" in item:
primary_tax_id = item["Tax_ID_Text"]
account_data = _get_account_data_from_dict(
sup_data.get("Settlement_Account_Widget_Data", {})
Expand Down

0 comments on commit 097c79c

Please sign in to comment.