From b5daff7a95dcf7c9fe2c71b1d6565653caeec888 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Sun, 4 Apr 2021 01:33:52 +0200
Subject: [PATCH] update data

---
 .../blueprints/owid/owid_service_update.py    | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/covid19/blueprints/owid/owid_service_update.py b/src/covid19/blueprints/owid/owid_service_update.py
index 86e5e137..ed88c3d0 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,
-- 
GitLab