We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dcc03c6 + 86091da commit 9647f9cCopy full SHA for 9647f9c
1 file changed
manager/src/manager/serializers.py
@@ -556,6 +556,13 @@ class SceneSerializer(NonNullSerializer):
556
trs_matrix = serializers.SerializerMethodField('get_trs_matrix')
557
558
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
566
allowed = set(self.fields.keys()) | {
567
"mesh_translation",
568
"mesh_rotation",
0 commit comments