You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user without change permissions but with view permissions visits a change page with a CountryField, it crashes:
Traceback (most recent call last):
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/core/handlers/base.py", line 145, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/core/handlers/base.py", line 143, in _get_response
response = response.render()
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/response.py", line 106, in render
self.content = self.rendered_content
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/response.py", line 83, in rendered_content
content = template.render(context, self._request)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 171, in render
return self._render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/test/utils.py", line 96, in instrumented_test_render
return self.nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/test/utils.py", line 96, in instrumented_test_render
return self.nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/test/utils.py", line 96, in instrumented_test_render
return self.nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 209, in render
nodelist.append(node.render_annotated(context))
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/loader_tags.py", line 188, in render
return template.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 173, in render
return self._render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/test/utils.py", line 96, in instrumented_test_render
return self.nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 209, in render
nodelist.append(node.render_annotated(context))
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 209, in render
nodelist.append(node.render_annotated(context))
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 209, in render
nodelist.append(node.render_annotated(context))
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 209, in render
nodelist.append(node.render_annotated(context))
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 309, in render
return nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/defaulttags.py", line 309, in render
return nodelist.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 987, in render
output = self.filter_expression.resolve(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 671, in resolve
obj = self.var.resolve(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 796, in resolve
value = self._resolve_lookup(context)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/template/base.py", line 858, in _resolve_lookup
current = current()
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/contrib/admin/helpers.py", line 218, in contents
result_repr = display_for_field(value, f, self.empty_value_display)
File "/home/phihag/.local/share/virtualenvs/octonie-vqgHbSx7/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 382, in display_for_field
return dict(field.flatchoices).get(value, empty_value_display)
TypeError: unhashable type: 'list'
The problem is that value is something like [Country(code='BE'), Country(code='CA')]. I'm not sure this can be solved in plain Django, because the render path does not seem to have a read-only rendering. See also https://code.djangoproject.com/ticket/30577
The text was updated successfully, but these errors were encountered:
If a user without change permissions but with view permissions visits a change page with a CountryField, it crashes:
The problem is that value is something like
[Country(code='BE'), Country(code='CA')]
. I'm not sure this can be solved in plain Django, because the render path does not seem to have a read-only rendering. See also https://code.djangoproject.com/ticket/30577The text was updated successfully, but these errors were encountered: