Przeglądaj źródła

Merge pull request #15340 from netchampfaris/meta-table-fields

fix: set empty lists for unset meta table fields
version-14
Faris Ansari 3 lat temu
committed by GitHub
rodzic
commit
89648a5cf7
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 0 usunięć
  1. +5
    -0
      frappe/model/meta.py

+ 5
- 0
frappe/model/meta.py Wyświetl plik

@@ -120,6 +120,11 @@ class Meta(Document):
or (not no_nulls and value is None)):
out[key] = value

# set empty lists for unset table fields
for table_field in DOCTYPE_TABLE_FIELDS:
if not out.get(table_field.fieldname):
out[table_field.fieldname] = []

return out

return serialize(self)


Ładowanie…
Anuluj
Zapisz