From fe9c0d2f17f4dfa30a3930d02523b075bc0b4c5f Mon Sep 17 00:00:00 2001 From: mariagrimaldi Date: Mon, 4 Jan 2021 15:11:38 -0400 Subject: [PATCH] Added capability to ignore fields when creating them --- openedx/core/djangoapps/user_authn/views/registration_form.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openedx/core/djangoapps/user_authn/views/registration_form.py b/openedx/core/djangoapps/user_authn/views/registration_form.py index 673d01b357b..88c3a7a8047 100644 --- a/openedx/core/djangoapps/user_authn/views/registration_form.py +++ b/openedx/core/djangoapps/user_authn/views/registration_form.py @@ -679,6 +679,9 @@ def _add_custom_field(self, form_desc, required=True, **kwargs): field_name (str): Name used to get field information when creating it. """ field_name = kwargs.pop("field_name") + if field_name in getattr(settings, "EDNX_IGNORE_REGISTER_FIELDS", []): + return + custom_field_dict = self._get_custom_field_dict(field_name) if not custom_field_dict: log.error("Field with name {} must have a definition dictionary.".format(field_name))