fix: batch_no filtering not working when batch no is also a number in scientific notation (#30770) (#30771)
[skip ci]
(cherry picked from commit ee3036651a)
Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user