Skip to content

Commit

Permalink
Merge pull request #583 from eduNEXT/li/ednx/JU-11
Browse files Browse the repository at this point in the history
fix: fix instance typo when creating select field
  • Loading branch information
mariajgrimaldi authored Nov 22, 2021
2 parents d056d6d + d0328a9 commit bc03dbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions openedx/core/djangoapps/user_authn/views/registration_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,11 @@ def _add_custom_field(self, form_desc, required=True, **kwargs):

# Check to convert options:
field_options = custom_field_dict.get("options")
if field_options:
if instance(field_options, dict):
field_options = [(str(value.lower()), name) for value, name in field_options.items()]
elif isinstance(field_options, list):
field_options = [(str(value.lower()), value) for value in field_options]

if isinstance(field_options, dict):
field_options = [(str(value.lower()), name) for value, name in field_options.items()]
elif isinstance(field_options, list):
field_options = [(str(value.lower()), value) for value in field_options]

# Set default option if applies:
default_option = custom_field_dict.get("default")
Expand Down

0 comments on commit bc03dbb

Please sign in to comment.