Open lundberg opened 4 years ago
I'm having the same issue but with a field named label
Code:
class RiskFieldSerializer(serializers.Serializer):
id = serializers.CharField()
label = serializers.CharField()
status = serializers.CharField()
Error message:
Incompatible types in assignment (expression has type "CharField", base class "Field" defined the type as "Optional[str]")
just ran into this with a field named label
, glad this issue is open or i never would have solved it
If a serializer has a field named the same as DRF's
Serializer
class properties;data
,errors
andfields
, an assignment error will be thrown.