fix(Asset Repair): Simplify code for Asset Repair creation in tests
This commit is contained in:
parent
e328e3b48a
commit
fd7fb37697
@ -138,10 +138,7 @@ def create_asset_repair(**args):
|
|||||||
"consumed_quantity": args.qty or 1
|
"consumed_quantity": args.qty or 1
|
||||||
})
|
})
|
||||||
|
|
||||||
try:
|
asset_repair.insert(ignore_if_duplicate=True)
|
||||||
asset_repair.save()
|
|
||||||
except frappe.DuplicateEntryError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if args.submit:
|
if args.submit:
|
||||||
asset_repair.repair_status = "Completed"
|
asset_repair.repair_status = "Completed"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user