Added docstring

This commit is contained in:
Oliver Walters 2019-04-28 11:49:20 +10:00
parent ec166c906f
commit 2076faaa6c

View File

@ -37,6 +37,11 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
"""
def validate(self, data):
""" Perform serializer validation.
In addition to running validators on the serializer fields,
this class ensures that the underlying model is also validated.
"""
# Run any native validation checks first (may throw an ValidationError)
data = super(serializers.ModelSerializer, self).validate(data)