Skip to content

Commit

Permalink
fix: in stock qty to zero if none from query
Browse files Browse the repository at this point in the history
  • Loading branch information
HKuz committed Mar 5, 2024
1 parent 2d1e18d commit 56dc0b7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def get_bom_data(bom_no, demanded_qty, filters, indent, is_root=False):
for r in results:
r.update(
{
"in_stock_qty": r.in_stock_qty or 0,
"orig_parts_can_build_qty": int(r.orig_parts_can_build_qty)
if r.orig_parts_can_build_qty
else 0,
Expand Down

0 comments on commit 56dc0b7

Please sign in to comment.