greco: send NULL when a param is missing (#78260)
gitea/passerelle/pipeline/head Build started...
Details
gitea/passerelle/pipeline/head Build started...
Details
This commit is contained in:
parent
62ed945d62
commit
16a9364750
|
@ -118,7 +118,7 @@ class FormData:
|
|||
if isinstance(value, datetime):
|
||||
value = value.strftime('%Y-%m-%dT%H:%M:%S')
|
||||
else:
|
||||
value = ''
|
||||
value = None
|
||||
if '_' not in fieldname:
|
||||
self.json[fieldname] = value
|
||||
continue
|
||||
|
|
|
@ -246,8 +246,8 @@ def test_greco_rest_create_ok(app, rest_conn):
|
|||
assert json_part.headers[b'Content-Type'] == b'application/json'
|
||||
demande_creation = json.loads(json_part.content)
|
||||
assert demande_creation['application'] == '69999'
|
||||
assert demande_creation['beneficiaire']['fax'] == ''
|
||||
assert demande_creation['beneficiaire']['numerovoie'] == ''
|
||||
assert demande_creation['beneficiaire']['fax'] == None
|
||||
assert demande_creation['beneficiaire']['numerovoie'] == None
|
||||
assert demande_creation['localisation']['xgeoloc'] == '50.89491'
|
||||
assert demande_creation['localisation']['ygeoloc'] == '4.34151'
|
||||
assert demande_creation['transmetteur']['nom'] == 'Vertommen'
|
||||
|
|
Loading…
Reference in New Issue