fix(Asset Repair): Simplify code for Asset Repair creation in tests

This commit is contained in:
GangaManoj 2021-06-24 22:30:08 +05:30
parent e328e3b48a
commit fd7fb37697

View File

@ -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"