From 9454f99888c3a483c9f2a66835c4cdd2f343ee43 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Sun, 2 May 2021 11:59:59 +0200
Subject: [PATCH] working on: 0.0.32 Release

---
 src/covid19/blueprints/who/who_model_import.py   | 3 ++-
 src/covid19/blueprints/who/who_service_update.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/covid19/blueprints/who/who_model_import.py b/src/covid19/blueprints/who/who_model_import.py
index 3fc0e2b4..4db10ce7 100644
--- a/src/covid19/blueprints/who/who_model_import.py
+++ b/src/covid19/blueprints/who/who_model_import.py
@@ -69,7 +69,8 @@ class WhoImport(db.Model):
             .group_by(cls.date_reported)\
             .distinct().all()
         for item, in myresultset:
-            pass
+            if not item in myresultarray:
+                myresultarray.append(item)
         return myresultarray
 
     @classmethod
diff --git a/src/covid19/blueprints/who/who_service_update.py b/src/covid19/blueprints/who/who_service_update.py
index f53cbbc1..be9747d3 100644
--- a/src/covid19/blueprints/who/who_service_update.py
+++ b/src/covid19/blueprints/who/who_service_update.py
@@ -22,7 +22,7 @@ class WhoServiceUpdateFull(WhoServiceUpdateBase):
         app.logger.info("------------------------------------------------------------")
         WhoDateReported.remove_all()
         i = 0
-        for i_date_reported, in WhoImport.get_dates_reported_as_array():
+        for i_date_reported, in WhoImport.get_dates_reported():
             i += 1
             output = " [ " + str(i) + " ] " + i_date_reported
             o = WhoDateReported.create_new_object_factory(my_date_rep=i_date_reported)
@@ -85,6 +85,7 @@ class WhoServiceUpdateFull(WhoServiceUpdateBase):
     def __full_update_data(self):
         app.logger.info(" WhoServiceUpdateFull.__full_update_data [begin]")
         app.logger.info("------------------------------------------------------------")
+        WhoData.remove_all()
         new_dates_reported_from_import = WhoImport.get_dates_reported_as_array()
         i = 0
         for my_date_reported in new_dates_reported_from_import:
-- 
GitLab