Skip to content

Commit 4fd545b

Browse files
committed
Trim Sanctions Check threshold values to two decimals instead of one.
1 parent 1fcae92 commit 4fd545b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

repositories/opensanctions_repository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ func (repo OpenSanctionsRepository) buildQueryString(cfg *models.SanctionCheckCo
326326
if query != nil {
327327
// Unless determined otherwise, we do not need those results that are *not*
328328
// matches. They could still be filtered further down the chain, but we do not need them returned.
329-
qs.Set("threshold", fmt.Sprintf("%.1f", float64(query.OrgConfig.MatchThreshold)/100))
330-
qs.Set("cutoff", fmt.Sprintf("%.1f", float64(query.OrgConfig.MatchThreshold)/100))
329+
qs.Set("threshold", fmt.Sprintf("%.2f", float64(query.OrgConfig.MatchThreshold)/100))
330+
qs.Set("cutoff", fmt.Sprintf("%.2f", float64(query.OrgConfig.MatchThreshold)/100))
331331

332332
qs.Set("limit", fmt.Sprintf("%d", query.OrgConfig.MatchLimit+query.LimitIncrease))
333333
}

0 commit comments

Comments
 (0)