Fix TypeError when worst mapped file is None in quality replacement
When no mapped files exist for a person, worst is None and the old f-string tried to subscript it before the conditional was evaluated. Extracted worst_score_str as a local variable to avoid the crash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -338,9 +338,10 @@ def upload_to_frigate(jobs: list[dict]) -> None:
|
||||
continue
|
||||
worst = get_lowest_quality_mapped_file(name)
|
||||
if worst is None or new_score <= worst[2]:
|
||||
worst_score_str = f"{worst[2]:.3f}" if worst is not None else "N/A"
|
||||
progress.console.print(
|
||||
f" [dim]⏭ {fname}: score {new_score:.3f} ≤ worst mapped"
|
||||
f" {worst[2]:.3f if worst else 'N/A'}, skipping[/dim]"
|
||||
f" {worst_score_str}, skipping[/dim]"
|
||||
)
|
||||
progress.advance(upload_task)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user