File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def everything
19
19
# TODO: typos, dendros, etc.
20
20
C14
21
21
. left_outer_joins ( :c14_lab )
22
+ . joins ( "LEFT OUTER JOIN cals on (cals.c14_age = c14s.bp AND cals.c14_error = c14s.std)" )
22
23
. left_outer_joins ( sample : [
23
24
:material ,
24
25
:taxon ,
@@ -76,7 +77,18 @@ def decode_range_filters(filters)
76
77
if filters . dig ( :c14s , :bp ) . present?
77
78
filters . dig ( :c14s , :bp ) . replace ( slice_ranges ( filters . dig ( :c14s , :bp ) ) )
78
79
end
79
-
80
+
81
+ if filters . dig ( :cals ) . present?
82
+ # Ensure the value for :tpq is replaced with the array
83
+ tpq_value = filters . dig ( :cals , :tpq )
84
+ filters [ :cals ] [ :tpq ] = slice_ranges ( [ 50000 , tpq_value ] ) if tpq_value
85
+ #filters[:cals][:tpq] = !nil
86
+
87
+ # Ensure the value for :taq is replaced with the array
88
+ taq_value = filters . dig ( :cals , :taq )
89
+ filters [ :cals ] [ :taq ] = slice_ranges ( [ taq_value , 0 ] ) if taq_value
90
+ end
91
+
80
92
return filters
81
93
end
82
94
You can’t perform that action at this time.
0 commit comments