fix: init only existing single doctypes

This commit is contained in:
Nabin Hait 2022-08-11 17:10:55 +05:30
parent f9c23393e5
commit 395caebd5a

View file

@ -493,7 +493,7 @@ def init_singles():
doc.flags.ignore_mandatory = True
doc.flags.ignore_validate = True
doc.save()
except ImportError:
except (ImportError, frappe.DoesNotExistError):
# The doctype exists, but controller is deleted,
# no need to attempt to init such single, ref: #16917
continue