You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is that the date_time_created field in the args object is already converted to datetime and marshmallow gives error:
marshmallow.exceptions.ValidationError: {'date_time_created': ['Not a valid datetime.']}
Is there any way for the date parameter to remain as a string? I'm using request.json to get around the problem but pylint complains about an unused variable (args in the method).
I do not know if i was clear.
The text was updated successfully, but these errors were encountered:
The problem is in the values that come from the args that are injected into the method def update(args) I didn't want, for each view, to treat date fields.. When it is a date field it is already converted to python datetime. When serializing within the schema, it gives an error.
The args that the endpoint receives are already parsed. You are trying to parse them again and that is why you get the error. Once again, have a look at my code, I do not have any issues with datetimes in updates, at least I don't think I do.
I'm trying to load the parameters coming from the PUT request into the schema.
input payload:
The problem here is that the
date_time_created
field in theargs
object is already converted todatetime
and marshmallow gives error:Is there any way for the date parameter to remain as a string? I'm using
request.json
to get around the problem but pylint complains about an unused variable (args in the method).I do not know if i was clear.
The text was updated successfully, but these errors were encountered: