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
Describe the bug
Attempting to upload a file to bulk import seed data under NAV 5.0.0 crashes the SeedDB page with an AttributeError (which is masked by a broken custom 500 error handler view, which @hmpf is working on separately).
To Reproduce
Steps to reproduce the behavior:
Create an organization bulk import file, containing only a single line, e.g. foobar
Go to the SeedDB in the NAV web ui
Click on Organization -> Bulk Import -> Choose file
Select the bulk import file you created.
Click Preview import.
See error
Expected behavior
A preview of the bulk import results, as would happen if the import data was entered manually into the text area below the Choose file button.
Environment (please complete the following information):
OS on the NAV server: Debian 10
NAV 5.0.0
Method of installation: Debian package
Additional context
This is the logged traceback:
Internal Server Error: /seeddb/organization/bulk/
Traceback (most recent call last):
File "/opt/venvs/nav/lib/python3.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/opt/venvs/nav/lib/python3.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response =self.process_exception_by_middleware(e, request)
File "/opt/venvs/nav/lib/python3.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/venvs/nav/lib/python3.7/site-packages/nav/web/seeddb/page/organization.py", line 92, in organization_bulk
extra_context=info.template_context)
File "/opt/venvs/nav/lib/python3.7/site-packages/nav/web/seeddb/utils/bulk.py", line 34, in render_bulkimport
form = BulkImportForm(parser_cls, request.POST, request.FILES)
File "/opt/venvs/nav/lib/python3.7/site-packages/nav/web/seeddb/forms/bulk.py", line 45, in __init__self.data['bulk_data'] = bulk_file.read()
File "/opt/venvs/nav/lib/python3.7/site-packages/django/http/request.py", line 435, in __setitem__self._assert_mutable()
File "/opt/venvs/nav/lib/python3.7/site-packages/django/http/request.py", line 432, in _assert_mutableraiseAttributeError("This QueryDict instance is immutable")
AttributeError: This QueryDict instance is immutable
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to upload a file to bulk import seed data under NAV 5.0.0 crashes the SeedDB page with an AttributeError (which is masked by a broken custom 500 error handler view, which @hmpf is working on separately).
To Reproduce
Steps to reproduce the behavior:
foobar
Organization
->Bulk Import
->Choose file
Preview import
.Expected behavior
A preview of the bulk import results, as would happen if the import data was entered manually into the text area below the
Choose file
button.Environment (please complete the following information):
Additional context
This is the logged traceback:
The text was updated successfully, but these errors were encountered: