From 2076faaa6cdd6c4843db3f1fcf492dcb6e70b8c1 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 28 Apr 2019 11:49:20 +1000 Subject: [PATCH] Added docstring --- InvenTree/InvenTree/serializers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/InvenTree/serializers.py b/InvenTree/InvenTree/serializers.py index 7149668cc4..4ad5d1b87a 100644 --- a/InvenTree/InvenTree/serializers.py +++ b/InvenTree/InvenTree/serializers.py @@ -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)