Skip to content

fix: keep empty contact lists when merging multi-file responses - #106

Merged
karm1000 merged 1 commit into
version-15from
fix/res-merger-empty-contact-lists
Nov 18, 2026
Merged

karm1000 merged 1 commit into
version-15from
fix/res-merger-empty-contact-lists

Conversation

@karm1000

Copy link
Copy Markdown
Member

When the first file's response had a null party or contact, merging the next response created an empty object and skipped its [] email/phone lists. contact.email then read as None and raised "can only concatenate list (not "NoneType") to list" in set_details.

  • ResponseMerger: fill a missing/None key with an empty source value
  • add get_party_contact to collect emails/phones null-safely

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Reviews (1) · Last reviewed commit: "fix: keep empty contact lists when mergi..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91f488a5-8b35-4f36-8e67-fa6b9834775e
Commits

Reviewing files that changed from the base of the PR and between b9899c4 and 64e3a49.

Files selected for processing: 5

  • transaction_parser/tests/test_response_merger.py
  • transaction_parser/transaction_parser/controllers/expense.py
  • transaction_parser/transaction_parser/controllers/sales_order.py
  • transaction_parser/transaction_parser/controllers/transaction.py
  • transaction_parser/transaction_parser/utils/response_merger.py

No actionable comments were generated in the recent review.

Walkthrough

ResponseMerger now assigns a non-null empty source collection when the target value is null. New tests cover empty and non-empty lists, null source values, and retained destination values. Expense and sales-order controllers now pass billing and shipping party data to get_party_contact, which combines contact email and phone values before calling get_contact.

Merge Risk: Minimal · previous review b9899

This change keeps empty contact lists when merging multi-file responses, which prevents the list-concatenation error when the first response had a null party or contact. The new tests cover the main merge cases. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: keeping empty contact lists when merging multi-file responses. It matches the ResponseMerger fix and the new tests in the changeset. The fix is in the merge logic, whi…
Description check Passed The description explains the failure: a null party or contact in the first response caused the merge to skip the next response's empty email and phone lists. It names the ResponseMerger change and the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: keeping empty contact lists when merging multi-file responses. It matches the ResponseMerger fix and the new tests in the changeset. The fix is in the merge logic, which the title covers.

Full details: Description check

Explanation

The description explains the failure: a null party or contact in the first response caused the merge to skip the next response's empty email and phone lists. It names the ResponseMerger change and the new get_party_contact helper, both of which appear in the changeset.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e64e8b9b-a375-4940-965e-ce77b192d72c
Commits

Reviewing files that changed from the base of the PR and between f958bee and b9899c4.

Files selected for processing: 5

  • transaction_parser/tests/test_response_merger.py
  • transaction_parser/transaction_parser/controllers/expense.py
  • transaction_parser/transaction_parser/controllers/sales_order.py
  • transaction_parser/transaction_parser/controllers/transaction.py
  • transaction_parser/transaction_parser/utils/response_merger.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

When the first file's response had a null party or contact, merging the
next response created an empty object and skipped its `[]` email/phone
lists. `contact.email` then read as None and raised
"can only concatenate list (not "NoneType") to list" in set_details.

- ResponseMerger: fill a missing/None key with an empty source value
- add get_party_contact to collect emails/phones null-safely
@karm1000
karm1000 force-pushed the fix/res-merger-empty-contact-lists branch from b9899c4 to 64e3a49 Compare November 18, 2026 06:16
@karm1000
karm1000 merged commit 6be13b9 into version-15 Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant