Merge pull request #11647 from deepeshgarg007/test_fix

fix: Ignore hash collision count limit in tests
This commit is contained in:
mergify[bot] 2020-10-06 07:47:05 +00:00 committed by GitHub
commit c2f780e26e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -347,7 +347,7 @@ class BaseDocument(object):
if self.meta.autoname=="hash":
# hash collision? try again
frappe.flags.retry_count = (frappe.flags.retry_count or 0) + 1
if frappe.flags.retry_count > 5:
if frappe.flags.retry_count > 5 and not frappe.flags.in_test:
raise
self.name = None
self.db_insert()