diff --git a/BACKLOG.md b/BACKLOG.md index 664c0fdbdd3747439621069831ec2ea09085da4f..108960210ee10256590de50c6fd1f8ddabadef49 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -161,7 +161,7 @@ * Issue #121 implement EuropeServiceUpdate.update_star_schema_incremental * Issue #122 implement EuropeServiceUpdate.update_star_schema_initial * Issue #123 split RkiService into two Services, one for bundeslaender and one for landkreise -* Issue #124 rename RkiGermanyData to RkiBundeslaender +* Issue #124 rename RkiBundeslaender to RkiBundeslaender * Issue #125 implement RkiLandkreise * Issue #126 implement RkiBundeslaenderImport * Issue #127 implement RkiBundeslaenderImport.get_dates_reported diff --git a/src/covid19/blueprints/rki/rki_model.py b/src/covid19/blueprints/rki/rki_model.py index 1cc7645ae841312e8aa0b95d222b09679687687c..1e99b6cc571ecf48c40adb30cdea27ede1eefa94 100644 --- a/src/covid19/blueprints/rki/rki_model.py +++ b/src/covid19/blueprints/rki/rki_model.py @@ -101,8 +101,8 @@ class RkiCountry(db.Model): # TODO: #123 split RkiService into two Services, one for bundeslaender and one for landkreise -# TODO: #124 rename RkiGermanyData to RkiBundeslaender -class RkiGermanyData(db.Model): +# TODO: #124 rename RkiBundeslaender to RkiBundeslaender +class RkiBundeslaender(db.Model): __tablename__ = 'rki_bundeslsaender' id = db.Column(db.Integer, primary_key=True) diff --git a/src/covid19/blueprints/rki/rki_service_update.py b/src/covid19/blueprints/rki/rki_service_update.py index f29794ba7a5ca5d0f3451a7b001f0b0a45a7f14c..dad7987934cd39390b13f5e4640d8807e68a5b3f 100644 --- a/src/covid19/blueprints/rki/rki_service_update.py +++ b/src/covid19/blueprints/rki/rki_service_update.py @@ -1,6 +1,6 @@ from database import db, app -from covid19.blueprints.rki.rki_model import RkiRegion, RkiDateReported, RkiCountry, RkiGermanyData +from covid19.blueprints.rki.rki_model import RkiRegion, RkiDateReported, RkiCountry, RkiBundeslaender from covid19.blueprints.rki.rki_model_import import RkiBundeslaenderImport, RkiLandkreiseImport from covid19.blueprints.rki.rki_model_import import RkiGermanyDataImportTable @@ -115,11 +115,11 @@ class RkiServiceUpdate: for result_item in result: my_country = countries[result_item.country_code] my_date_reported = dates_reported[result_item.date_reported] - result_who_global_data = RkiGermanyData.find_one_or_none_by_date_and_country( + result_who_global_data = RkiBundeslaender.find_one_or_none_by_date_and_country( my_date_reported, my_country) if result_who_global_data is None: - o = RkiGermanyData( + o = RkiBundeslaender( cases_new=int(result_item.new_cases), cases_cumulative=int(result_item.cumulative_cases), deaths_new=int(result_item.new_deaths), @@ -148,7 +148,7 @@ class RkiServiceUpdate: my_date = RkiDateReported.find_by_date_reported(my_date_reported) for result_item in RkiGermanyDataImportTable.get_for_one_day(my_date_reported): my_country = RkiCountry.find_by_country_code(result_item.country_code) - o = RkiGermanyData( + o = RkiBundeslaender( cases_new=int(result_item.new_cases), cases_cumulative=int(result_item.cumulative_cases), deaths_new=int(result_item.new_deaths), @@ -173,14 +173,14 @@ class RkiServiceUpdate: def __update_who_global_data_initial(self): app.logger.info(" update RKI initial [begin]") app.logger.info("------------------------------------------------------------") - RkiGermanyData.remove_all() + RkiBundeslaender.remove_all() new_dates_reported_from_import = RkiGermanyDataImportTable.get_new_dates_as_array() i = 0 for my_date_reported in new_dates_reported_from_import: my_date = RkiDateReported.find_by_date_reported(my_date_reported) for result_item in RkiGermanyDataImportTable.get_for_one_day(my_date_reported): my_country = RkiCountry.find_by_country_code(result_item.country_code) - o = RkiGermanyData( + o = RkiBundeslaender( cases_new=int(result_item.new_cases), cases_cumulative=int(result_item.cumulative_cases), deaths_new=int(result_item.new_deaths),