Skip to content
Snippets Groups Projects
Commit 4840bd32 authored by Jo Sama's avatar Jo Sama :scream:
Browse files

Fix bug in post_setra_data(), actually handle 409

parent ea0930b4
No related branches found
Tags v0.8.0
No related merge requests found
Pipeline #74813 failed
...@@ -253,7 +253,7 @@ class SetraClient(object): ...@@ -253,7 +253,7 @@ class SetraClient(object):
response = self.get(url) response = self.get(url)
return response.json() 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 POST combination of batch, vouchers and transactions
""" """
...@@ -262,7 +262,7 @@ class SetraClient(object): ...@@ -262,7 +262,7 @@ class SetraClient(object):
response = self.post(url, response = self.post(url,
data=batchdata.json(), data=batchdata.json(),
headers=headers, headers=headers,
return_response=return_response) return_response=True)
if response.status_code in (409, 202): if response.status_code in (409, 202):
return 'OK' return 'OK'
else: else:
......
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