location.google_takeout_semantic: handle None visitConfidence
This commit is contained in:
parent
65c617ed94
commit
70bb9ed0c5
1 changed files with 3 additions and 2 deletions
|
@ -54,8 +54,9 @@ def locations() -> Iterator[Res[Location]]:
|
|||
|
||||
for g in events():
|
||||
if isinstance(g, SemanticLocation):
|
||||
if g.visitConfidence < require_confidence:
|
||||
logger.debug(f"Skipping {g} due to low confidence ({g.visitConfidence}))")
|
||||
visitConfidence = g.visitConfidence
|
||||
if visitConfidence is None or visitConfidence < require_confidence:
|
||||
logger.debug(f"Skipping {g} due to low confidence ({visitConfidence}))")
|
||||
continue
|
||||
yield Location(
|
||||
lon=g.lng,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue