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
|
||||
})
|
||||
|
||||
try:
|
||||
asset_repair.save()
|
||||
except frappe.DuplicateEntryError:
|
||||
pass
|
||||
asset_repair.insert(ignore_if_duplicate=True)
|
||||
|
||||
if args.submit:
|
||||
asset_repair.repair_status = "Completed"
|
||||
|
Loading…
Reference in New Issue
Block a user