From c5e2fd0ddfd64dc723a70905ae6d86760c8ef832 Mon Sep 17 00:00:00 2001 From: Johan Le Baut Date: Thu, 5 Oct 2023 21:05:43 +0200 Subject: [PATCH] netwo: fix init of response and change start eligibility condition --- webapp/main.py | 1 - webapp/netwo/netwo.py | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/main.py b/webapp/main.py index 16ad48e..ad379ca 100644 --- a/webapp/main.py +++ b/webapp/main.py @@ -64,7 +64,6 @@ def getMap(): @app.route("/eligdata", methods=["GET"]) def getEligData(): - toto = 1 args = request.args valid_args = True processed_args = {} diff --git a/webapp/netwo/netwo.py b/webapp/netwo/netwo.py index f786d02..998ea2e 100644 --- a/webapp/netwo/netwo.py +++ b/webapp/netwo/netwo.py @@ -183,14 +183,15 @@ class Netwo: nbOperatorsOk=0, nbOperatorsErrors=0, nbOperatorsPending=0, + totalOperators=0, eligStatus={}, timeoutReached=False, timeoutSec=timeout_sec, - eligOffers={}, + eligOffers=[], imb_info=imb_info, ) - if imb_info.get("imb_status") != NETWO_DEPLOYED_STATUS: + if imb_info.get("imb_status") == NETWO_NOT_FOUND_STATUS: netwo_elig["eligDone"] = True yield "data: %s\n\n" % json.dumps(netwo_elig) return