int_dict: Fix type errors for user_groups.

This fixes some harmless type errors from the
following commit:

    6ec5a1f306

The IntDict code automatically converts strings to
integers, so this was not a user-facing problem, but
we want to have our callers do the conversions
explicitly.
This commit is contained in:
Steve Howell 2020-01-27 17:48:46 +00:00 committed by showell
parent b80f8babcc
commit ef892271dc
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ function get_user_group_id_for_mention_button(elem) {
const user_group_id = $(elem).attr('data-user-group-id');
if (user_group_id) {
return user_group_id;
return parseInt(user_group_id, 10);
}
return;

View File

@ -298,7 +298,7 @@ exports.set_up = function () {
});
$('#user-groups').on('click', '.delete', function () {
const group_id = $(this).parents('.user-group').attr('id');
const group_id = parseInt($(this).parents('.user-group').attr('id'), 10);
if (!exports.can_edit(group_id)) {
return;
}