fix: extend autoname validation to child items

This commit is contained in:
Ankush Menat 2022-04-14 15:16:59 +05:30
parent b8114eea9c
commit b409a7eeba
2 changed files with 2 additions and 1 deletions

View file

@ -869,7 +869,7 @@ class BaseDocument(object):
autoname = self.meta.autoname or ""
_empty, _field_specifier, fieldname = autoname.partition("field:")
if fieldname and self.name and self.name != self.get("fieldname"):
if fieldname and self.name and self.name != self.get(fieldname):
self.set(fieldname, self.name)
def throw_length_exceeded_error(self, df, max_length, value):

View file

@ -528,6 +528,7 @@ class Document(BaseDocument):
d._validate_non_negative()
d._validate_length()
d._validate_code_fields()
d._sync_autoname_field()
d._extract_images_from_text_editor()
d._sanitize_content()
d._save_passwords()