[2.3] 500 error when clicking the 'Upload' button with no script selected.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Lee Trager |
Bug Description
Steps to reproduce:
1. Go to Settings tab and click on 'Upload script' in the 'Commissioning scripts' section.
2. Click on 'Upload' button (without uploading a script).
500 stacktrace is produced:
==> /var/log/
2017-08-22 12:34:12 regiond: [info] ::1 GET /MAAS/rpc/ HTTP/1.0 --> 200 OK (referrer: -; agent: provisioningser
2017-08-22 12:34:16 maasserver.
Traceback (most recent call last):
File "/usr/lib/
response = wrapped_
File "/usr/lib/
return view_atomic(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/usr/lib/
return view_func(request, *args, **kwargs)
File "/usr/lib/
return self.dispatch(
File "/usr/lib/
return handler(request, *args, **kwargs)
File "/usr/lib/
return super(BaseCreat
File "/usr/lib/
if form.is_valid():
File "/usr/lib/
if not self._form.
AttributeError: 'CommissioningS
2017-08-22 12:34:16 regiond: [info] ::1 POST /MAAS/commissio
Related branches
- Blake Rouse (community): Approve
-
Diff: 673 lines (+117/-82)6 files modifiedsrc/maasserver/api/tests/test_commissioning.py (+3/-3)
src/maasserver/api/tests/test_scripts.py (+4/-4)
src/maasserver/forms/script.py (+18/-4)
src/maasserver/forms/tests/test_script.py (+70/-69)
src/maasserver/testing/factory.py (+21/-1)
src/maasserver/views/tests/test_settings_commissioning_scripts.py (+1/-1)
summary: |
- 500 error when trying to upload commissioning script + [2.3] 500 error when trying to upload commissioning script |
Changed in maas: | |
assignee: | nobody → Lee Trager (ltrager) |
summary: |
- [2.3] 500 error when clicking the upload button having a script to - upload + [2.3] 500 error when clicking the 'Upload' button with no script + selected. |
description: | updated |
Changed in maas: | |
milestone: | 2.3.0alpha2 → 2.3.0 |
Changed in maas: | |
status: | Confirmed → In Progress |
assignee: | nobody → Lee Trager (ltrager) |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 2.3.0 → 2.3.0alpha3 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The solution here is the form should disable the 'upload' button until a file is selected.