fix: reject non-positive feature selections in feature_defaults rake task

This commit is contained in:
Shivam Mishra
2026-07-13 17:56:14 +05:30
parent c9d070d19f
commit 1936420a7a
+1 -1
View File
@@ -35,7 +35,7 @@ namespace :feature_defaults do
def select_feature(features, input)
index = Integer(input, exception: false)
return nil if index.nil?
return nil if index.nil? || !index.between?(1, features.length)
features[index - 1]
end