vvangelovski / django-audit-log

Audit log for your Django models
Other
232 stars 93 forks source link

is not JSON serializable #53

Open olivx opened 6 years ago

olivx commented 6 years ago

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 ?