-
Notifications
You must be signed in to change notification settings - Fork 39
TypeError: Object of type '__proxy__' is not JSON serializable #86
Comments
@luanfonceca I don't think this is a drf_openapi issue. It looks like you're trying to serialize a lazy translation object instead of a string. |
Thats also happen if we use the User models. |
Hi @werwty for me, that process of evaluating a string should happen inside the Can you help me out on what can i do in order to make that work? |
@luanfonceca I did a quick test of drf_openapi serialization with ugettext_lazy and it looks like it's not breaking drf_openapi. |
Hi @werwty, when i upgraded to the tip version of drf, it came back to work. Sorry for that. |
Description
Using
ugettext_lazy
inside Models break the Open API.Traceback
What I Did
Inside all my Models, i have set i18n strings using
ugettext_lazy
functional to translate it. If i use theugettext
instead of the lazy version, everything works fine.cc @fernandolins
The text was updated successfully, but these errors were encountered: