Skip to content

Commit

Permalink
tagging: fix handling trackers without all fields (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel authored Jan 5, 2025
1 parent ad316d9 commit e10be02
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions qbtools/commands/tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,11 @@ def __init__(app, logger):

if app.expired and tracker and t.state_enum.is_complete:
if (
tracker["required_seed_ratio"]
"required_seed_ratio" in tracker
and t.ratio >= tracker["required_seed_ratio"]
):
tags_to_add.append("expired")
elif tracker["required_seed_days"] and t.seeding_time >= utils.seconds(
tracker["required_seed_days"]
) or (
"required_seed_days" in tracker
and t.seeding_time >= utils.seconds(tracker["required_seed_days"])
):
tags_to_add.append("expired")

Expand Down

0 comments on commit e10be02

Please sign in to comment.