Edit consistency group form has an exception

Bug #1680506 reported by wei.ying
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
wei.ying

Bug Description

Env: devstack master branch

If old description is empty and submit edit consistency group form,it will throws an exception.

Exception info:
[06/Apr/2017 15:16:58] "GET /project/cgroups/671779c1-81de-4354-ac8c-db123f835afa/update/ HTTP/1.1" 200 2175
Internal Server Error: /project/cgroups/671779c1-81de-4354-ac8c-db123f835afa/update/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/edit.py", line 214, in post
    if form.is_valid():
  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 184, in is_valid
    return self.is_bound and not self.errors
  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 176, in errors
    self.full_clean()
  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 393, in full_clean
    self._clean_form()
  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 417, in _clean_form
    cleaned_data = self.clean()
  File "/opt/stack/horizon/openstack_dashboard/dashboards/project/cgroups/forms.py", line 35, in clean
    if len(old_desc):
TypeError: object of type 'NoneType' has no len()

wei.ying (wei.yy)
Changed in horizon:
assignee: nobody → wei.ying (wei.yy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/454238

Changed in horizon:
status: New → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/454238
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=bfec68032237db3c50227da7a1121698a916b0c8
Submitter: Jenkins
Branch: master

commit bfec68032237db3c50227da7a1121698a916b0c8
Author: wei.ying <email address hidden>
Date: Thu Apr 6 23:28:12 2017 +0800

    Fix edit consistency group form error

    If cgroup old description is empty and also judge its length,
    it will throw an error. We should first whether is empty.

    Change-Id: Ic89232b22a3d4673b14115e65dd670dded26f0a1
    Closes-Bug: 1680506

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b1

This issue was fixed in the openstack/horizon 12.0.0.0b1 development milestone.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.