Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #213 from open-contracting/bugs
Browse files Browse the repository at this point in the history
Fix bugs from Sentry
  • Loading branch information
jpmckinney committed Mar 29, 2021
2 parents e6c40ac + e13c38c commit 06fc748
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion country/management/commands/fetch_covid_active_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def handle(self, *args, **kwargs):
if (
not existing_db_entry
or not existing_db_entry.active_cases_count
or not existing_db_entry.death_cases
or not existing_db_entry.death_count
):
request_string = f"https://covid-api.com/api/reports?iso={country_code}&date={date}"
r = requests.get(request_string)
Expand Down
2 changes: 2 additions & 0 deletions country/management/commands/generate_excel_summary.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import socket

import xlsxwriter
Expand All @@ -12,6 +13,7 @@ class Command(BaseCommand):

def handle(self, *args, **kwargs):
print("Exporting!!!!!!!!")
os.makedirs(os.path.join("media", "export"), exist_ok=True)
workbook = xlsxwriter.Workbook("media/export/overall_summary.xlsx")
worksheet = workbook.add_worksheet()
row = 0
Expand Down
2 changes: 1 addition & 1 deletion country/red_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def flag4(self, contract_id):
)
contract_value = tender_instance["contract_value"]
tender_value = tender_instance["tender_value"]
if contract_value > tender_value:
if tender_value and contract_value > tender_value:
return True
else:
return False
Expand Down

0 comments on commit 06fc748

Please sign in to comment.