Merge pull request #38774 from ShrihariMahabal/prevent-single-virtual-doctype-persistence

fix: prevent persistence of virtual single doctypes
This commit is contained in:
Shrihari Mahabal 2026-04-21 21:53:49 +05:30 committed by GitHub
commit 81259709a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -898,6 +898,9 @@ class Document(BaseDocument):
def update_single(self, d):
"""Updates values for Single type Document in `tabSingles`."""
if self.meta.is_virtual:
return
frappe.db.delete("Singles", {"doctype": self.doctype})
for field, value in d.items():
if field != "doctype":