fixed POST when a null evaluation enum is sent
This commit is contained in:
parent
28767fb4c3
commit
7d196957d3
@ -194,8 +194,12 @@ class ShipcallSchema(Schema):
|
|||||||
|
|
||||||
@post_load
|
@post_load
|
||||||
def make_shipcall(self, data, **kwargs):
|
def make_shipcall(self, data, **kwargs):
|
||||||
|
if 'type' in data:
|
||||||
data['type_value'] = data['type'].value
|
data['type_value'] = data['type'].value
|
||||||
|
else:
|
||||||
|
data['type_value'] = ShipcallType.undefined
|
||||||
if 'evaluation' in data:
|
if 'evaluation' in data:
|
||||||
|
if data['evaluation']:
|
||||||
data['evaluation_value'] = data['evaluation'].value
|
data['evaluation_value'] = data['evaluation'].value
|
||||||
else:
|
else:
|
||||||
data['evaluation_value'] = EvaluationType.undefined
|
data['evaluation_value'] = EvaluationType.undefined
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user