Skip to content

Commit

Permalink
fix range_max range_min bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed May 22, 2024
1 parent a153e1e commit 178625b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/actions/universities/index.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class Universities::Index < BrowserAction
param order_by : String = ""
param click_on : String = ""
param batch_level : String = ""
param min_value : Int32 = 0
param max_value : Int32 = 0
param range_min_value : Int32 = 0
param range_max_value : Int32 = 0
param filter_by_column : String = ""
param page : Int32 = 1

Expand Down Expand Up @@ -147,8 +147,8 @@ class Universities::Index < BrowserAction

range_max, range_min = fetch_range_max_min(filter_by_column, query)

min_value = range_min.to_i if min_value.zero?
max_value = range_max.to_i if max_value.zero?
min_value = range_min_value.zero? ? range_min.to_i : range_min_value
max_value = range_max_value.zero? ? range_max.to_i : range_max_value

if filter_by_column.presence
case filter_by_column
Expand Down

0 comments on commit 178625b

Please sign in to comment.