Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is not JSON serializable #53

Open
olivx opened this issue Dec 4, 2017 · 0 comments
Open

is not JSON serializable #53

olivx opened this issue Dec 4, 2017 · 0 comments

Comments

@olivx
Copy link

olivx commented Dec 4, 2017

I'm still using , Django 1.8 and python 2.7 ...

when i try to save my model , i receive the error...
<django.utils.functional.proxy object at 0x7f5ffe8cd590> is not JSON serializable

my method:
if not CustomStatusStep.objects.filter(company=obj, title=(u'Aberta')):
CustomStatusStep.objects.create(
company=obj,
title=
(u'Aberta'),
creator=request.user,
standard=True ...
)

and the error, i believes is in this part:
if created:
changes = model_instance_diff(None, instance)
log_entry = LogEntry.objects.log_create(
instance,
action=LogEntry.Action.CREATE,
changes=json.dumps(changes), ...
)

i believes , the error ocorre when i pass this parameter
title=_(u'Aberta') ....

there is some hack for this ?
so, how i can use ugettext_lazy whith django-udity-log ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant