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
No related tags found
No related merge requests found
Pipeline #74813 failed
......@@ -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:
......
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