Disabled quotas cannot be obtained properly

Bug #1611368 reported by Tatiana Ovchinnikova
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
manila-ui
Fix Released
Undecided
Tatiana Ovchinnikova

Bug Description

All attempts to check create share action permission are futile, and instead of "Create Share" button we get a traceback:

Error while checking action permissions.
Traceback (most recent call last):
  File "/home/lys/OpenStack/manila/horizon/horizon/tables/base.py", line 1289, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/home/lys/OpenStack/manila/horizon/horizon/tables/actions.py", line 137, in _allowed
    self.allowed(request, datum))
  File "/home/lys/OpenStack/manila/manila-ui/manila_ui/dashboards/project/shares/shares/tables.py", line 75, in allowed
    usages = quotas.tenant_quota_usages(request)
  File "/home/lys/OpenStack/manila/manila-ui/manila_ui/dashboards/project/shares/__init__.py", line 57, in wrapper
    return new_func(orig_func, *args, **kwargs)
  File "/home/lys/OpenStack/manila/manila-ui/manila_ui/dashboards/project/shares/__init__.py", line 137, in tenant_quota_usages
    usages = f(request, tenant_id)
  File "/home/lys/OpenStack/manila/horizon/horizon/utils/memoized.py", line 90, in wrapped
    value = cache[key] = func(*args, **kwargs)
  File "/home/lys/OpenStack/manila/horizon/openstack_dashboard/usage/quotas.py", line 392, in tenant_quota_usages
    disabled_quotas = get_disabled_quotas(request)
  File "/home/lys/OpenStack/manila/manila-ui/manila_ui/dashboards/project/shares/__init__.py", line 57, in wrapper
    return new_func(orig_func, *args, **kwargs)
  File "/home/lys/OpenStack/manila/manila-ui/manila_ui/dashboards/project/shares/__init__.py", line 129, in get_disabled_quotas
    disabled_quotas.extend(_get_manila_disabled_quotas(request))
AttributeError: 'set' object has no attribute 'extend'

Disabled quotas should be treated as a set, not as a list.

Changed in manila-ui:
assignee: nobody → Tatiana Ovchinnikova (tmazur)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila-ui (master)

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

Changed in manila-ui:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila-ui (master)

Reviewed: https://review.openstack.org/352889
Committed: https://git.openstack.org/cgit/openstack/manila-ui/commit/?id=06c81a4a071270f4ba9ffabf218f0b187e141e22
Submitter: Jenkins
Branch: master

commit 06c81a4a071270f4ba9ffabf218f0b187e141e22
Author: Tatiana Ovchinnikova <email address hidden>
Date: Tue Aug 9 16:04:15 2016 +0300

    Fix get_disabled_quotas

    Disabled quotas should be treated as a set, not as a list, or else
    instead of action buttons we'll get a traceback:

    File "/manila-ui/manila_ui/dashboards/project/shares/__init__.py",
        line 129, in get_disabled_quotas
        disabled_quotas.extend(_get_manila_disabled_quotas(request))
    AttributeError: 'set' object has no attribute 'extend'

    Change-Id: I5364a8b7fbea3f166264c33ffb6eff341e140bdf
    Closes-Bug: #1611368

Changed in manila-ui:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila-ui 2.4.0

This issue was fixed in the openstack/manila-ui 2.4.0 release.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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