Skip to content

Commit

Permalink
fix(test): fixed test case not creating serials
Browse files Browse the repository at this point in the history
  • Loading branch information
noahjacob committed Dec 17, 2021
1 parent 450369d commit 90d3200
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def make_serial_item_with_serial(item_code):
serial_item_doc.has_serial_no = 1
serial_item_doc.serial_no_series = "TEST.###"
serial_item_doc.save(ignore_permissions=True)
if frappe.db.exists('Serial No', {"status": "Active", "item_code": item_code}):
active_serials = frappe.db.get_all('Serial No', {"status": "Active", "item_code": item_code})
if len(active_serials) < 2:
make_serialized_item(item_code=item_code)

def get_events(ms):
Expand Down

0 comments on commit 90d3200

Please sign in to comment.