Skip to content

Commit

Permalink
- Fix issue #35 to prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
makeasnek committed Dec 1, 2023
1 parent 66df503 commit d3dd8ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1883,8 +1883,11 @@ def add_mag_to_combined_stats(
list of projects which are being crunched but not on approved projects list.
"""
unapproved_list = []
if not mag_ratios:
log.error('In add_mag_to_combined_ratios but mag_ratios is empty. Setting all mag ratios to zero.')
mag_ratios={}
for project_url, project_stats in combined_stats.items():
found_mag_ratio = mag_ratios.get(project_url)
found_mag_ratio = mag_ratios.get(project_url,0)
if not found_mag_ratio:
if project_url not in approved_projects:
if project_url not in preferred_projects:
Expand Down

0 comments on commit d3dd8ea

Please sign in to comment.