'Check there is only one default of each type.'

def on_update(self):

    from frappe.core.doctype.user.user import ask_pass_update, setup_user_email_inbox
    self.there_must_be_only_one_default()
    setup_user_email_inbox(email_account=self.name, awaiting_password=self.awaiting_password, email_id=self.email_id, enable_outgoing=self.enable_outgoing)
