Bug #7328
Error 500 when adding an user
0%
Description
Traceback: File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 111. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/db/transaction.py" in inner 394. return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view 21. return view_func(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view 69. return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py" in dispatch 67. return super(PermissionMixin, self).dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py" in dispatch 172. return self.return_ajax_response(request, response) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py" in return_ajax_response 189. response.render() File "/usr/lib/python2.7/dist-packages/django/template/response.py" in render 103. self.content = self.rendered_content File "/usr/lib/python2.7/dist-packages/django/template/response.py" in rendered_content 80. content = template.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 148. return self._render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render 142. return self.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 844. bit = self.render_node(node, context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node 80. return node.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 126. return compiled_parent._render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render 142. return self.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 844. bit = self.render_node(node, context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node 80. return node.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 126. return compiled_parent._render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render 142. return self.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 844. bit = self.render_node(node, context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node 80. return node.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 126. return compiled_parent._render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _render 142. return self.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 844. bit = self.render_node(node, context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node 80. return node.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 65. result = block.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 844. bit = self.render_node(node, context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node 80. return node.render(context) File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py" in render 65. result = block.nodelist.render(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in render 844. bit = self.render_node(node, context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render_node 80. return node.render(context) File "/usr/lib/python2.7/dist-packages/django/template/debug.py" in render 90. output = self.filter_expression.resolve(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in resolve 596. obj = self.var.resolve(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in resolve 734. value = self._resolve_lookup(context) File "/usr/lib/python2.7/dist-packages/django/template/base.py" in _resolve_lookup 788. current = current() File "/usr/lib/python2.7/dist-packages/django/forms/forms.py" in as_p 275. errors_on_separate_row=True) File "/usr/lib/python2.7/dist-packages/django/forms/forms.py" in _html_output 219. 'field': six.text_type(bf), File "/usr/lib/python2.7/dist-packages/django/forms/forms.py" in __str__ 508. return self.as_widget() File "/usr/lib/python2.7/dist-packages/django/forms/forms.py" in as_widget 560. return force_text(widget.render(name, self.value(), attrs=attrs)) File "/usr/lib/python2.7/dist-packages/django_select2/widgets.py" in render 207. s += self.render_js_code(id_, name, value, attrs, choices) File "/usr/lib/python2.7/dist-packages/django_select2/widgets.py" in render_js_code 155. return self.render_js_script(self.render_inner_js_code(id_, *args)) File "/usr/lib/python2.7/dist-packages/django_select2/widgets.py" in render_inner_js_code 657. js += super(AutoHeavySelect2Mixin, self).render_inner_js_code(id_, *args) File "/usr/lib/python2.7/dist-packages/django_select2/widgets.py" in render_inner_js_code 476. texts = self.render_texts_for_value(id_, value, choices) File "/usr/lib/python2.7/dist-packages/django_select2/widgets.py" in render_texts_for_value 569. texts = self.render_texts(value, choices) File "/usr/lib/python2.7/dist-packages/django_select2/widgets.py" in render_texts 418. self_choices.set_extra_filter(**{'%s__in' % self.field.get_pk_field_name(): selected_choices}) File "/usr/lib/python2.7/dist-packages/django_select2/fields.py" in set_extra_filter 364. self.queryset = self._original_queryset.filter(**filter_map) File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py" in manager_method 92. return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in filter 691. return self._filter_or_exclude(False, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/db/models/query.py" in _filter_or_exclude 709. clone.query.add_q(Q(*args, **kwargs)) File "/usr/lib/python2.7/dist-packages/django/db/models/sql/query.py" in add_q 1331. clause, require_inner = self._add_q(where_part, self.used_aliases) File "/usr/lib/python2.7/dist-packages/django/db/models/sql/query.py" in _add_q 1358. current_negated=current_negated, connector=connector) File "/usr/lib/python2.7/dist-packages/django/db/models/sql/query.py" in build_filter 1230. condition = self.build_lookup(lookups, col, value) File "/usr/lib/python2.7/dist-packages/django/db/models/sql/query.py" in build_lookup 1138. return final_lookup(lhs, rhs) File "/usr/lib/python2.7/dist-packages/django/db/models/lookups.py" in __init__ 82. self.rhs = self.get_prep_lookup() File "/usr/lib/python2.7/dist-packages/django/db/models/lookups.py" in get_prep_lookup 85. return self.lhs.output_field.get_prep_lookup(self.lookup_name, self.rhs) File "/usr/lib/python2.7/dist-packages/django/db/models/fields/__init__.py" in get_prep_lookup 648. return [self.get_prep_value(v) for v in value] File "/usr/lib/python2.7/dist-packages/django/db/models/fields/__init__.py" in get_prep_value 915. return int(value) Exception Type: ValueError at /manage/users/add/ Exception Value: invalid literal for int() with base 10: 'fpeters'
Historique
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
Can't reproduce :/ Even if I try to use your account or Pierre's one by modifying locally your passwords. I'm using chromium 41 and iceweasel 31. Can I ask you to investigate what's in the "roles" input field after just opening the add dialog ? It appears to contain your username in this case but I still don't know why.
Mis à jour par Pierre Cros il y a presque 9 ans
Le jeudi 21 mai 2015 à 15:15 +0200, redmine@entrouvert.com a écrit :
Can't reproduce :/ Even if I try to use your account or Pierre's one
by modifying locally your passwords. I'm using chromium 41 and
iceweasel 31. Can I ask you to investigate what's in the "roles" input
field after just opening the add dialog ? It appears to contain your
username in this case but I still don't know why.
The "roles" field is empty.
Mis à jour par Frédéric Péters il y a presque 9 ans
The POST contains the following non-empty fields:
- csrfmiddlewaretoken: [...]
- is_active: on
- roles: fpeters
- send_mail: on
- password1: XXX
In the HTML dom, there's s2id_id_roles, then input#id_roles, then a hidden div holding input[name=roles], set with "fpeters"; it's not present in the received HTML (json embedded, at /manage/users/add/). (the behaviour of /manage/users/add, without going through the popup, is the same).
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
I completely removed the role field from those forms so I think the problem should not be anymore. Can you confirm ? (New code is deployed on cresson).
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Assigné à mis à Benjamin Dauvergne
- Version cible mis à 2.2.0
Mis à jour par Benjamin Dauvergne il y a presque 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Solution déployée à Fermé