fix: handle virtual doctype flag for existing doctypes
This commit is contained in:
parent
092d32be33
commit
42d889d2a4
2 changed files with 3 additions and 3 deletions
|
|
@ -30,9 +30,9 @@ class DBTable:
|
|||
self.get_columns_from_docfields()
|
||||
|
||||
def sync(self):
|
||||
if self.is_new() and not self.meta.virtual_doctype:
|
||||
if self.is_new() and not self.meta.get('virtual_doctype'):
|
||||
self.create()
|
||||
elif not self.meta.virtual_doctype:
|
||||
elif not self.meta.get('virtual_doctype'):
|
||||
frappe.cache().hdel('table_columns', self.table_name)
|
||||
self.alter()
|
||||
|
||||
|
|
|
|||
|
|
@ -687,7 +687,7 @@ class Document(BaseDocument):
|
|||
`self.check_docstatus_transition`."""
|
||||
conflict = False
|
||||
self._action = "save"
|
||||
if not self.get('__islocal') and not self.meta.virtual_doctype:
|
||||
if not self.get('__islocal') and not self.meta.get('virtual_doctype'):
|
||||
if self.meta.issingle:
|
||||
modified = frappe.db.sql("""select value from tabSingles
|
||||
where doctype=%s and field='modified' for update""", self.doctype)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue