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