api: Fix encoding of strings in default stream groups.

Remove unnecessary json_validator for string parameters.  This change
does not modify JavaScript because we don't have a frontend for these
API endpoints yet.

Fixes part of #18035.
This commit is contained in:
Gaurav Pandey
2021-05-04 15:04:11 +05:30
committed by Tim Abbott
parent d6cf1ef27b
commit b2111f5753
2 changed files with 7 additions and 7 deletions

View File

@@ -176,8 +176,8 @@ def update_default_stream_group_info(
request: HttpRequest,
user_profile: UserProfile,
group_id: int,
new_group_name: Optional[str] = REQ(json_validator=check_string, default=None),
new_description: Optional[str] = REQ(json_validator=check_string, default=None),
new_group_name: Optional[str] = REQ(default=None),
new_description: Optional[str] = REQ(default=None),
) -> None:
if not new_group_name and not new_description:
return json_error(_('You must pass "new_description" or "new_group_name".'))