Skip to content

Commit

Permalink
fix lin
Browse files Browse the repository at this point in the history
  • Loading branch information
mg98 committed Oct 15, 2024
1 parent fe24438 commit 8f00e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tribler/core/recommender/community.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def process_query_info(self, peer: Peer, request: dict) -> None:
query_id=query.rowid,
results=len(unpacked["results"]),
chosen_index=unpacked["chosen_index"],
timestamp=unpacked["timestamp"] if "timestamp" in unpacked else 0,
timestamp=unpacked.get("timestamp", 0),
query=unpacked["query"],
)), b""))

Expand Down Expand Up @@ -222,7 +222,7 @@ def __init__(self, request_cache: RequestCache, peer: Peer, response: dict) -> N
self.total_results = response["results"]
self.results: list[ResultItem | None] = [None] * self.total_results
self.chosen_index = response["chosen_index"]
self.timestamp = response["timestamp"] if "timestamp" in response else 0
self.timestamp = response.get("timestamp", 0)
self.query = response["query"]

def get_next_range(self) -> tuple[int, int] | None:
Expand Down

0 comments on commit 8f00e79

Please sign in to comment.