I got a problem using serializers.Serializer, with the integerfield field. #8148
Unanswered
rsousadev
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When validating the field using
It checks the field value if it is higher or lower than the values entered the serializer, but it does not check the field type
Examples of request in the field, sending a post
The value is in a string in this case it should return a type error of the sent value, but nothing happens and it continues the request without returning any error
Second example of post submission:
In this second example I'm sending a value lower than the one passed as a parameter in the serializer, but it's a string and not an int it reads the value of a string and returns the following response
What later becomes an error in the code for checking a simple if value >, because value is not an int but a string, if it is necessary to use this field in any other piece of code
Beta Was this translation helpful? Give feedback.
All reactions