Skip to content

Commit 4067adc

Browse files
committed
Fix random selection for service
1 parent 105bac0 commit 4067adc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/services/partner_routing_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def vita_partner_from_zip_code
104104
eligible_with_capacity = Organization.with_capacity.joins(:serviced_zip_codes).
105105
where(vita_partner_zip_codes: { zip_code: @zip_code })
106106

107-
vita_partner = eligible_with_capacity.order(Arel.sql('RANDOM()')).first
107+
vita_partner = eligible_with_capacity.sample
108108

109109
if vita_partner.present?
110110
@routing_method = :zip_code

0 commit comments

Comments
 (0)