Skip to content

Commit

Permalink
fix: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
snehasaisneha committed Jun 4, 2024
1 parent 24ac962 commit b22f65d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/epipipeline/standardise/gisdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ def fuzzy_matching(string, choices, threshold):
# what does process.extractOne do?
best_match = process.extractOne(str(string), choices)

if best_match[1] > threshold:
if best_match is None:
return None
elif best_match[1] > threshold:
return best_match[0]
else:
return None

0 comments on commit b22f65d

Please sign in to comment.