fix: skip table creation for virtual doctype

This commit is contained in:
Shridhar 2020-12-15 16:18:26 +05:30 committed by Chinmay D. Pai
parent c7b29100af
commit 0b4940f017
No known key found for this signature in database
GPG key ID: 75507BE256F40CED

View file

@ -30,9 +30,9 @@ class DBTable:
self.get_columns_from_docfields()
def sync(self):
if self.is_new():
if self.is_new() and not self.meta.virtual_doctype:
self.create()
else:
elif not self.meta.virtual_doctype:
frappe.cache().hdel('table_columns', self.table_name)
self.alter()