Skip to content
Snippets Groups Projects
Commit b5daff7a authored by thomaswoehlke's avatar thomaswoehlke
Browse files

update data

parent 577e7dd6
Branches
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment