Merge pull request #9536 from scmmishra/count-fix

fix: recheck zero count
This commit is contained in:
mergify[bot] 2020-02-25 06:01:36 +00:00 committed by GitHub
commit ded3bb95d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ def get_data(module, build=True):
exists_cache = get_table_with_counts()
def doctype_contains_a_record(name):
exists = exists_cache.get(name)
if not type(exists) == int:
if not exists:
if not frappe.db.get_value('DocType', name, 'issingle'):
exists = frappe.db.count(name)
else: