diff --git a/coordinator/ProcessorSurveysWRT.py b/coordinator/ProcessorSurveysWRT.py index f2c87c66a0fb4975b6c843921fecebdcd35243a3..12018382db477443b658351a9bfe1a5c780fea31 100644 --- a/coordinator/ProcessorSurveysWRT.py +++ b/coordinator/ProcessorSurveysWRT.py @@ -40,10 +40,12 @@ cases_severity = { def get_from_WRT(form_credentials: dict, startDate: str, endDate: str): '''Make the HTTP request, then checking the status code.''' - url = f"{form_credentials['url']}WheatRustAPI/api/Survey" + url = f"{form_credentials['url']}WheatRustAPI/api/Survey/GetAll" + #url = f"{form_credentials['url']}WheatRustAPI/api/Survey/GetByPublishedLevel" url += '?strStopDate=' + endDate url += '&strStartDate=' + startDate url += '&strArrayCountryID='+ form_credentials['countryID'] + #url += '&strArrayPublishedLevel=Unpubl' # set up http session session = requests.Session() @@ -137,10 +139,10 @@ def nested_to_flattened(df): df[i] = "" # add dedicated rust columns, with default values - NEW_RUST_COLUMNS = {"SR.Incident":"none","SR.Severity":"-9","SR.Reaction":"na", - "LR.Incident":"none","LR.Severity":"-9","LR.Reaction":"na", - "YR.Incident":"none","YR.Severity":"-9","YR.Reaction":"na", - "Septoria.Incident":"none","Septoria.Severity":"0"} + NEW_RUST_COLUMNS = {"SR.Incident":"N","SR.Severity":"N","SR.Reaction":"N", + "LR.Incident":"N","LR.Severity":"N","LR.Reaction":"N", + "YR.Incident":"N","YR.Severity":"N","YR.Reaction":"N", + "Septoria.Incident":"N","Septoria.Severity":"N"} for i in NEW_RUST_COLUMNS.keys(): df[i] = NEW_RUST_COLUMNS[i]