From 7b404a835bd555bf5129fb74f2a9801ead25b946 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 6 Oct 2020 12:55:09 +0530 Subject: [PATCH] fix: Ignore hash collosion count limit in tests --- frappe/model/base_document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 5497090e72..0a219b4253 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -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()