diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 99b68ed536..5f4b1d3fae 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -361,7 +361,7 @@ class User(Document): self.set(field, sanitize_html(field_value, always_sanitize=True)) def set_full_name(self): - self.full_name = " ".join(filter(None, [self.first_name, self.last_name])) + self.full_name = " ".join(p for p in [self.first_name, self.middle_name, self.last_name] if p) def check_enable_disable(self): # do not allow disabling administrator/guest