fix: handle None case for item wise tax details in validation#4602
fix: handle None case for item wise tax details in validation#4602ljain112 wants to merge 1 commit into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Confidence Score: 5/5Safe to merge — single-line fix for a well-understood crash, consistent with the pattern already used in the same file. The change is minimal and targeted: it fixes an iteration over None that occurs when _item_wise_tax_details is explicitly None on a Frappe document. Frappe's BaseDocument.get(key, []) silently ignores the [] because it is interpreted as the filters argument, not a default. The or [] idiom is already used at line 1166 of the same file for the same field, confirming this is the established project pattern. No files require special attention.
|
| Filename | Overview |
|---|---|
| india_compliance/gst_india/overrides/transaction.py | One-line fix replacing doc.get("key", []) with doc.get("key") or [] to correctly handle a None value returned when _item_wise_tax_details is set to None in the document's __dict__ |
Reviews (1): Last reviewed commit: "fix: handle None case for item wise tax ..." | Re-trigger Greptile
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated item-wise tax detail validation to use an empty list when 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
#4601