Skip to content

Commit

Permalink
Merge pull request #3009 from chaoss/last_collected_null_hotfix
Browse files Browse the repository at this point in the history
Fix comparison with NoneType logical error
  • Loading branch information
sgoggins authored Feb 22, 2025
2 parents e308fac + 1e417ca commit a1a9775
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 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,14 @@ 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_secondary_data_last_collected(repo_id)

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()}"
else:
logger.warning(f"core_data_last_collected is NULL for recollection on repo: {repo_git}")

pr_reviews = get_pull_request_reviews_by_repo_id(repo_id)

Expand Down

0 comments on commit a1a9775

Please sign in to comment.