From 4840bd3230fbf062c6941932f2caef3381a578cf Mon Sep 17 00:00:00 2001 From: Jo Sama <jo.sama@usit.uio.no> Date: Mon, 26 Apr 2021 10:49:48 +0200 Subject: [PATCH] Fix bug in post_setra_data(), actually handle 409 --- setra_client/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setra_client/client.py b/setra_client/client.py index 87a646f..9c887fe 100644 --- a/setra_client/client.py +++ b/setra_client/client.py @@ -253,7 +253,7 @@ class SetraClient(object): response = self.get(url) return response.json() - def post_new_batch(self, batchdata: Batch, return_response: bool = False): + def post_new_batch(self, batchdata: Batch): """ POST combination of batch, vouchers and transactions """ @@ -262,7 +262,7 @@ class SetraClient(object): response = self.post(url, data=batchdata.json(), headers=headers, - return_response=return_response) + return_response=True) if response.status_code in (409, 202): return 'OK' else: -- GitLab