diff --git a/src/covid19/blueprints/owid/owid_service_update.py b/src/covid19/blueprints/owid/owid_service_update.py index 86e5e1377921cd68681a1306ea2ceefb7f75cdd7..ed88c3d0bbfb2c7882889b2069c21fd421c5eee3 100644 --- a/src/covid19/blueprints/owid/owid_service_update.py +++ b/src/covid19/blueprints/owid/owid_service_update.py @@ -47,7 +47,7 @@ class OwidServiceUpdate: db.session.add(myday) db.session.commit() my_OwidDateReported = OwidDateReported.get_by_date_reported(my_date_reported) - app.logger.info(my_OwidDateReported) + app.logger.info(str(my_OwidDateReported) + " added") k = 0 for oi in OwidImport.get_for_one_day(my_date_reported): my_OwidContinent = OwidContinent.find_by_region(i_region=oi.continent) @@ -57,8 +57,8 @@ class OwidServiceUpdate: db.session.commit() my_OwidContinent = OwidContinent.find_by_region(i_region=oi.continent) app.logger.info(str(my_OwidContinent) + " added") - else: - app.logger.info(str(my_OwidContinent) + " not added" + str(my_OwidContinent.id)) + # else: + # app.logger.info(str(my_OwidContinent) + " not added" + str(my_OwidContinent.id)) my_OwidCountry = OwidCountry.find_by_iso_code_and_location(iso_code=oi.iso_code, location=oi.location) if my_OwidCountry is None: my_OwidCountry = OwidCountry( @@ -83,8 +83,8 @@ class OwidServiceUpdate: db.session.commit() my_OwidCountry = OwidCountry.find_by_iso_code_and_location(iso_code=oi.iso_code, location=oi.location) app.logger.info(str(my_OwidCountry) + " added") - else: - app.logger.info(str(my_OwidCountry) + " not added" + str(my_OwidCountry.id)) + # else: + # app.logger.info(str(my_OwidCountry) + " not added" + str(my_OwidCountry.id)) o = OwidData( date_reported=my_OwidDateReported, country=my_OwidCountry, @@ -155,8 +155,8 @@ class OwidServiceUpdate: db.session.commit() my_OwidDateReported = OwidDateReported.get_by_date_reported(my_date_reported) app.logger.info(str(my_OwidDateReported) + " added") - else: - app.logger.info(str(my_OwidDateReported) + " not added" + str(my_OwidDateReported.id)) + # else: + # app.logger.info(str(my_OwidDateReported) + " not added" + str(my_OwidDateReported.id)) for oi in OwidImport.get_for_one_day(my_date_reported): my_OwidContinent = OwidContinent.find_by_region(i_region=oi.continent) if my_OwidContinent is None: @@ -165,8 +165,8 @@ class OwidServiceUpdate: db.session.commit() my_OwidContinent = OwidContinent.find_by_region(i_region=oi.continent) app.logger.info(str(my_OwidContinent) + " added") - else: - app.logger.info(str(my_OwidContinent) + " not added" + str(my_OwidContinent.id)) + # else: + # app.logger.info(str(my_OwidContinent) + " not added" + str(my_OwidContinent.id)) my_OwidCountry = OwidCountry.find_by_iso_code_and_location( iso_code=oi.iso_code, location=oi.location @@ -199,8 +199,8 @@ class OwidServiceUpdate: location=oi.location ) app.logger.info(str(my_OwidCountry) + " added") - else: - app.logger.info(str(my_OwidCountry) + " not added" + str(my_OwidCountry.id)) + # else: + # app.logger.info(str(my_OwidCountry) + " not added" + str(my_OwidCountry.id)) o = OwidData( date_reported=my_OwidDateReported, country=my_OwidCountry,