Properly gate group conditions
The default group ("All Skills") is technically -1, not null
This commit is contained in:
parent
a69fda5ead
commit
ae36ff59b4
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ class Api::V1::SearchController < Api::V1::ApiController
|
||||||
if search_params[:filters].present? && search_params[:filters]["group"].present?
|
if search_params[:filters].present? && search_params[:filters]["group"].present?
|
||||||
group = search_params[:filters]["group"].to_i
|
group = search_params[:filters]["group"].to_i
|
||||||
|
|
||||||
if (group < 4)
|
if (group >= 0 && group < 4)
|
||||||
conditions[:color] = group
|
conditions[:color] = group
|
||||||
conditions[:emp] = false
|
conditions[:emp] = false
|
||||||
conditions[:base] = false
|
conditions[:base] = false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue