From 4e908be35364fa87ff88b3cc449dce14244b7a52 Mon Sep 17 00:00:00 2001 From: Chandrakant Gopalan <chandrakant.gopalan@gmail.com> Date: Thu, 10 May 2018 12:08:17 -0400 Subject: [PATCH] Removed unnecessary boolean cast --- src/metabase/query_processor/middleware/parameters/dates.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metabase/query_processor/middleware/parameters/dates.clj b/src/metabase/query_processor/middleware/parameters/dates.clj index b21532e67e2..07314fb2a6e 100644 --- a/src/metabase/query_processor/middleware/parameters/dates.clj +++ b/src/metabase/query_processor/middleware/parameters/dates.clj @@ -115,13 +115,13 @@ {:parser (regex->parser #"past([0-9]+)(day|week|month|year)s(~?)", [:int-value :unit :include-current?]) :range (fn [{:keys [unit int-value unit-range to-period include-current?]} dt] (unit-range (t/minus dt (to-period int-value)) - (t/minus dt (to-period (if (boolean (seq include-current?)) 0 1))))) + (t/minus dt (to-period (if (seq include-current?) 0 1))))) :filter (fn [{:keys [unit int-value include-current?]} field] ["TIME_INTERVAL" field (- int-value) unit {:include-current (boolean (seq include-current?))}])} {:parser (regex->parser #"next([0-9]+)(day|week|month|year)s(~?)" [:int-value :unit :include-current?]) :range (fn [{:keys [unit int-value unit-range to-period include-current?]} dt] - (unit-range (t/plus dt (to-period (if (boolean (seq include-current?)) 0 1))) + (unit-range (t/plus dt (to-period (if (seq include-current?) 0 1))) (t/plus dt (to-period int-value)))) :filter (fn [{:keys [unit int-value]} field] ["TIME_INTERVAL" field int-value unit])} -- GitLab