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

Refactoring: vaccination

parent 65428f02
No related branches found
No related tags found
1 merge request!162Refactoring 2021 05 20 start
......@@ -45,6 +45,13 @@ class RkiMeldedatum(BlueprintDateReported):
db.session.rollback()
return num_rows_deleted
@classmethod
def delete_all(cls):
for o in cls.find_all():
db.session.remove(o)
db.session.commit()
return None
class RkiDatenstand(BlueprintDateReported):
__tablename__ = 'rki_date_datenstand'
......
......@@ -62,7 +62,7 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
def __full_update_date_reported(self):
app.logger.info(" RkiServiceUpdateFull.__full_update_date_reported [begin]")
app.logger.info("------------------------------------------------------------")
RkiMeldedatum.remove_all()
RkiMeldedatum.delete_all()
i = 0
output_lines = []
for datum_of_import in RkiImport.get_meldedatum_list():
......@@ -71,7 +71,6 @@ class RkiServiceUpdateFull(RkiServiceUpdateBase):
i += 1
o = BlueprintDateReportedFactory.create_new_object_for_rki(my_date_rep=datum_of_import[0])
db.session.add(o)
db.session.commit()
output = " [ " + str(i) + " ] full update RKI meldedatum ... " + str(o)
output_lines.append(output)
app.logger.info(output)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment