Project

General

Profile

Bug #10071

/api/register/ should serialize user using the new BaseUserSerializer

Added by Benjamin Dauvergne over 3 years ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
24 Feb 2016
Due date:
% Done:

100%

Patch proposed:
No
Planning:
No

Description

Internal Server Error: /api/register/
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 137, in get_response
    response = response.render()
  File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 103, in render
    self.content = self.rendered_content
  File "/usr/lib/python2.7/dist-packages/rest_framework/response.py", line 59, in rendered_content
    ret = renderer.render(self.data, media_type, context)
  File "/usr/lib/python2.7/dist-packages/rest_framework/renderers.py", line 99, in render
    separators=separators
  File "/usr/lib/python2.7/json/__init__.py", line 250, in dumps
    sort_keys=sort_keys, **kw).encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/dist-packages/rest_framework/utils/encoders.py", line 61, in default
    return super(JSONEncoder, self).default(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <OrganizationalUnit u'zone-les' u'Zone LES'> is not JSON serializable

Associated revisions

Revision 04415d44 (diff)
Added by Benjamin Dauvergne over 3 years ago

api: use BaseUserSerializer to return user serialization in /api/register/ (fixes #10071)

History

#1 Updated by Benjamin Dauvergne over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Nouveau to Résolu (à déployer)

#2 Updated by Benjamin Dauvergne over 3 years ago

  • Status changed from Résolu (à déployer) to Solution déployée

#3 Updated by Benjamin Dauvergne over 1 year ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF