FIX: Respond to user search correctly when category_id is blank

Previously it would search for category_id=0, which does not exist. With the new permission checks, this returns a 404
This commit is contained in:
David Taylor
2019-10-28 13:18:47 +00:00
parent f0617f96ed
commit 6de49b88df
2 changed files with 10 additions and 2 deletions

View File

@ -921,8 +921,7 @@ class UsersController < ApplicationController
topic_id = params[:topic_id]
topic_id = topic_id.to_i if topic_id
category_id = params[:category_id]
category_id = category_id.to_i if category_id
category_id = params[:category_id].to_i if category_id.present?
topic_allowed_users = params[:topic_allowed_users] || false