Skip to content

Commit 9647f9c

Browse files
authored
Merge branch 'main' into feature/support-cosine
2 parents dcc03c6 + 86091da commit 9647f9c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

manager/src/manager/serializers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,13 @@ class SceneSerializer(NonNullSerializer):
556556
trs_matrix = serializers.SerializerMethodField('get_trs_matrix')
557557

558558
def validate(self, attrs):
559+
if not self.initial_data:
560+
raise serializers.ValidationError({'body': ['Request body is required.']})
561+
562+
name = attrs.get('name', None)
563+
if not name or not name.strip():
564+
raise serializers.ValidationError({'name': ['This field is required.']})
565+
559566
allowed = set(self.fields.keys()) | {
560567
"mesh_translation",
561568
"mesh_rotation",

0 commit comments

Comments
 (0)