From a146de9184d738dd706f9a40f5d9e48617f6414c Mon Sep 17 00:00:00 2001 From: rha104 <rha104@uib.no> Date: Tue, 27 Apr 2021 08:53:40 +0200 Subject: [PATCH] update return values --- setra_client/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setra_client/client.py b/setra_client/client.py index 74e384a..49695bd 100644 --- a/setra_client/client.py +++ b/setra_client/client.py @@ -287,11 +287,13 @@ class SetraClient(object): data=batchdata.json(), headers=headers, return_response=True) - if response.status_code in (409, 202): + if response.status_code in (204, 202): return 'OK' + elif response.status_code is 409: + return 'batch_found_but_cannot_be_updated' else: response.raise_for_status() - return response + return response def get_batch_complete(self, batch_id: str): """ -- GitLab