feat: Remove el option from education levels (#29150)

If COPPA flag is set to true then remove el options from education levels

VAN-760
This commit is contained in:
Adeel Ehsan
2021-10-28 15:50:47 +05:00
committed by GitHub
parent 5f97bc60cf
commit 2aa220094c

View File

@@ -595,7 +595,10 @@ class RegistrationFormFactory:
# The labels are marked for translation in UserProfile model definition.
# pylint: disable=translation-of-non-string
options = [(name, _(label)) for name, label in UserProfile.LEVEL_OF_EDUCATION_CHOICES]
if settings.ENABLE_COPPA_COMPLIANCE:
options = filter(lambda op: op[0] != 'el', options)
form_desc.add_field(
"level_of_education",
label=education_level_label,