AttributeError in Edit Extra Spec form.

Bug #1685822 reported by wei.ying on 2017-04-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)

Bug Description

Env: devstack master branch

Steps to reproduce:

1. Go to admin/volume Volume Types panel
2. Volume Types -> Click View Extra Specs -> Click Edit
3. Remove the 'Value' value (which is a required field). On form submit

Error info:
Internal Server Error: /admin/volume_types/b780ccbf-b45d-4b80-ac6d-d5e84eb993cc/extras/volume_backend_name/edit/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/stack/horizon/horizon/", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/", line 217, in post
    return self.form_invalid(form)
  File "/opt/stack/horizon/openstack_dashboard/dashboards/admin/volume_types/extras/", line 125, in form_invalid
    context = self._populate_context(context)
AttributeError: 'EditView' object has no attribute '_populate_context'
[24/Apr/2017 15:26:58] "POST /admin/volume_types/b780ccbf-b45d-4b80-ac6d-d5e84eb993cc/extras/volume_backend_name/edit/ HTTP/1.1" 500 142967

wei.ying (wei.yy) on 2017-04-24
Changed in horizon:
assignee: nobody → wei.ying (wei.yy)

Fix proposed to branch: master

Changed in horizon:
status: New → In Progress
Ying Zuo (yingzuo) wrote :

I didn't get the AttributeError with horizon master branch. Instead, I got error message "please fill out this field" shown in a tooltip, but it should be shown below the field instead.

Changed in horizon:
importance: Undecided → Low
wei.ying (wei.yy) wrote :

Hi Ying. Thanks for your comments.
When I upgraded the local environment, the problem didn't come back.

I'm not sure why the following method was not called again when the edit extra specs form was submitted.
But If the form_invalid function[1] is called, it will cause error. Due to the method '_populate_context has then redefined in [2].


Change abandoned by Ivan Kolodyazhny (<email address hidden>) on branch: master
Reason: This review is > 4 months without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers