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

Don't send null values when updating batch

The Setra API does not accept null values for attributes, but it accepts
that the attribute is omitted. We should probably accept null values
for fields in order to avoid obscure bugs like this, but it does not
hurt to omit the values.

At least we use less of the bandwidth! :)
parent e8ae992b
No related branches found
No related tags found
1 merge request!23Don't send null values when updating batch
Pipeline #94039 passed
......@@ -383,7 +383,7 @@ class SetraClient(object):
url = self.urls.put_update_batch()
headers = {'Content-Type': 'application/json'}
response = self.put(url,
data=batchdata.json(),
data=batchdata.json(exclude_unset=True),
headers=headers,
return_response=True)
if response.status_code == 204:
......
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