Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Setra Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
it-bott-integrasjoner
Setra Client
Commits
a146de91
Commit
a146de91
authored
3 years ago
by
rha104
Browse files
Options
Downloads
Patches
Plain Diff
update return values
parent
d16633a4
No related branches found
No related tags found
1 merge request
!14
FSHO-19: Added update batch method. And fixed format to match the post_new_batch method
Pipeline
#75236
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setra_client/client.py
+4
-2
4 additions, 2 deletions
setra_client/client.py
with
4 additions
and
2 deletions
setra_client/client.py
+
4
−
2
View file @
a146de91
...
...
@@ -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
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment