Skip to content

Commit

Permalink
fix: batch_no filtering not working when batch no is also a number in…
Browse files Browse the repository at this point in the history
… scientific notation (frappe#30770) (frappe#30771)

[skip ci]

(cherry picked from commit ee30366)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush authored Apr 21, 2022
1 parent ac433dc commit c339305
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions erpnext/stock/doctype/serial_no/serial_no.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,11 @@ def auto_fetch_serial_number(
exclude_sr_nos = get_serial_nos(clean_serial_no_string("\n".join(exclude_sr_nos)))

if batch_nos:
batch_nos = safe_json_loads(batch_nos)
if isinstance(batch_nos, list):
filters.batch_no = batch_nos
batch_nos_list = safe_json_loads(batch_nos)
if isinstance(batch_nos_list, list):
filters.batch_no = batch_nos_list
else:
filters.batch_no = [str(batch_nos)]
filters.batch_no = [batch_nos]

if posting_date:
filters.expiry_date = posting_date
Expand Down

0 comments on commit c339305

Please sign in to comment.