Implement abstract method of superclass
Since PrivateField is read only, there will never be any incoming data,
thus we raise NotImplementedError in the transformation method.
Issue: HIC-170
Change-Id: Iebc423934600c6c307c53a1fc37d103a2023743f
diff --git a/crashreports/serializers.py b/crashreports/serializers.py
index af71a70..1125f62 100644
--- a/crashreports/serializers.py
+++ b/crashreports/serializers.py
@@ -25,6 +25,14 @@
return super(PrivateField, self).get_attribute(instance)
return -1
+ def to_internal_value(self, data):
+ """Transform the *incoming* primitive data into a native value.
+
+ Since PrivateField is read only, there will never be any incoming data,
+ thus we raise NotImplementedError.
+ """
+ raise NotImplementedError()
+
class CrashReportSerializer(serializers.ModelSerializer):
"""Serializer for CrashReport instances."""