fix: Use doc.get to safely check for attr
This bypasses the bungle during site creations when meta isn't present in the database yet
This commit is contained in:
parent
12e3cee4a6
commit
151de897f1
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ class Meta(Document):
|
|||
self._valid_columns = self.default_fields + [
|
||||
df.fieldname
|
||||
for df in self.get("fields")
|
||||
if not df.is_virtual and df.fieldtype in data_fieldtypes
|
||||
if not df.get("is_virtual") and df.fieldtype in data_fieldtypes
|
||||
]
|
||||
if self.istable:
|
||||
self._valid_columns += list(child_table_fields)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue