Skip to content

Commit 974a485

Browse files
authored
fix: forest stats api 403 forbidden at chart creation (#438)
1 parent dace7ab commit 974a485

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/services/forest_liana/permissions_checker.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ def stat_with_parameters_allowed?
176176

177177
return false unless pool_permissions
178178

179-
# NOTICE: equivalent to Object.values in js
180-
array_query_request_info = @query_request_info.values
179+
# NOTICE: equivalent to Object.values in js & removes nil values
180+
array_query_request_info = @query_request_info.values.filter_map{ |x| x unless x.nil? }
181181

182182
# NOTICE: pool_permissions contains the @query_request_info
183183
# we use the intersection between statPermission and @query_request_info

0 commit comments

Comments
 (0)