fix: ignore duplicates explicitly

This commit is contained in:
Ankush Menat
2022-02-22 20:53:19 +05:30
committed by Ankush Menat
parent 856d3f63b5
commit 9c7df2eec5
15 changed files with 136 additions and 141 deletions

View File

@@ -175,7 +175,7 @@ class TestShoppingCart(unittest.TestCase):
def create_tax_rule(self):
tax_rule = frappe.get_test_records("Tax Rule")[0]
try:
frappe.get_doc(tax_rule).insert()
frappe.get_doc(tax_rule).insert(ignore_if_duplicate=True)
except (frappe.DuplicateEntryError, ConflictingTaxRule):
pass