mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added docstring
This commit is contained in:
parent
ba49b080b0
commit
a9224445b6
@ -37,6 +37,11 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def validate(self, data):
|
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)
|
# Run any native validation checks first (may throw an ValidationError)
|
||||||
data = super(serializers.ModelSerializer, self).validate(data)
|
data = super(serializers.ModelSerializer, self).validate(data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user