Skip to content
Snippets Groups Projects
Commit 52b47f2f authored by sks444's avatar sks444
Browse files

Save empty string if message is None

parent 6980691f
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,8 @@ class SubmissionDeterminationSerializer(serializers.ModelSerializer):
self.validated_data[instance.send_notice_field.id]
if instance.send_notice_field else True
)
instance.message = self.validated_data[instance.message_field.id]
message = self.validated_data[instance.message_field.id]
instance.message = '' if message is None else message
try:
instance.outcome = int(self.validated_data[instance.determination_field.id])
# Need to catch KeyError as outcome field would not exist in case of edit.
......
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