Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDEMPIERE-5703 NPE when importing Physical Inventory using Import CSV button #1813

Merged
merged 2 commits into from May 1, 2023

Conversation

CarlosRuiz-globalqss
Copy link
Collaborator

https://idempiere.atlassian.net/browse/IDEMPIERE-5703

Pull Request Checklist

  • My code follows the code guidelines of this project
  • My code follows the best practices of this project
  • I have performed a self-review of my own code
  • My code is easy to understand and review.
  • I have checked my code and corrected any misspellings
  • In hard-to-understand areas, I have commented my code.
  • My changes generate no new warnings

Tests

  • I have tested the direct scenario that my code is solving
  • I checked all collaterals that can be affected by my changes, and tested other potential affected scenarios
  • New and existing unit tests pass locally with my changes
  • I have added unit tests that prove my fix is effective or that my feature works

MInventory inventory = new MInventory(ctx, (Integer) mTab.getValue("M_Inventory_ID"), trxName);
int invId = 0;
if (mTab.getValue("M_Inventory_ID") != null)
invId = (Integer) mTab.getValue("M_Inventory_ID");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should immediate return null if mTab.getValue("M_Inventory_ID") is null

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hengsin - committed your suggestion

Copy link
Collaborator

@hengsin hengsin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial fix, good to go

@hengsin hengsin merged commit 70413f2 into idempiere:master May 1, 2023
4 checks passed
CarlosRuiz-globalqss added a commit that referenced this pull request May 1, 2023
… button (#1813)

* IDEMPIERE-5703 NPE when importing Physical Inventory using Import CSV button

* - implement better approach suggested by Heng Sin
@CarlosRuiz-globalqss CarlosRuiz-globalqss deleted the IDEMPIERE-5703 branch May 6, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants