mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
profile: Check field_type against FIELD_TYPE_CHOICES.
This commit is contained in:
@@ -38,7 +38,8 @@ def create_realm_custom_profile_field(request: HttpRequest,
|
||||
if error:
|
||||
return json_error(error)
|
||||
|
||||
if field_type not in CustomProfileField.FIELD_VALIDATORS:
|
||||
field_types = [i[0] for i in CustomProfileField.FIELD_TYPE_CHOICES]
|
||||
if field_type not in field_types:
|
||||
return json_error(_("Invalid field type."))
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user