Skip to content

Commit 5163efe

Browse files
committed
Bugfix: ExpertReportAnnotation user_note can not be nullable on the model
1 parent b00118a commit 5163efe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/serializers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,10 @@ def to_representation(self, instance):
655655

656656
class AnnotationSerializer(serializers.ModelSerializer):
657657
class AnnotationFeedbackSerializer(serializers.ModelSerializer):
658+
def validate_user_note(self, value):
659+
# message_for_user can not be null, cast to blank.
660+
return value or ""
661+
658662
def to_representation(self, instance):
659663
ret = super().to_representation(instance)
660664
# Ensure public_note and user_note will be None instead of blank

0 commit comments

Comments
 (0)