Skip to content

Commit

Permalink
Fix comparison with NoneType logical error
Browse files Browse the repository at this point in the history
Signed-off-by: Ulincsys <[email protected]>
  • Loading branch information
Ulincsys committed Feb 21, 2025
1 parent e308fac commit 9a4b866
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions augur/tasks/github/pull_requests/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,13 @@ def collect_pull_request_review_comments(repo_git: str, full_collection: bool) -
repo_id = get_repo_by_repo_git(repo_git).repo_id

if not full_collection:
# subtract 2 days to ensure all data is collected
core_data_last_collected = (get_core_data_last_collected(repo_id) - timedelta(days=2)).replace(tzinfo=timezone.utc)
review_msg_url += f"?since={core_data_last_collected.isoformat()}"
last_collected_date = get_core_data_last_collected(repo_id)

# the full_collection parameter is hardcoded to False, so we must check if there actually is a last_collected date
if last_collected_date:
# subtract 2 days to ensure all data is collected
core_data_last_collected = (last_collected_date - timedelta(days=2)).replace(tzinfo=timezone.utc)
review_msg_url += f"?since={core_data_last_collected.isoformat()}"

pr_reviews = get_pull_request_reviews_by_repo_id(repo_id)

Expand Down

0 comments on commit 9a4b866

Please sign in to comment.