Fix getting len() attr from boolean values
Address the issue by ensuring that the boolean value of extra specs or metadata being read are from string type. If they are not, we convert them before getting the length. Closes-Bug: #2004165 Change-Id: I96c7a6bf862ad81ed756f16f0c398ce68bcf5e66
This commit is contained in:
parent
c5184b28fc
commit
4f66162e3a
|
@ -86,6 +86,7 @@ def metadata_to_str(metadata, meta_visible_limit=4, text_length_limit=25):
|
|||
if len(k) > text_length_limit:
|
||||
k_shortenned = k[:text_length_limit] + '...'
|
||||
v = metadata[k]
|
||||
v = v if isinstance(v, str) else str(v)
|
||||
if len(v) > text_length_limit:
|
||||
v = v[:text_length_limit] + '...'
|
||||
meta.append("%s = %s" % (html_escape(k_shortenned), html_escape(v)))
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue while trying to load share types that had boolean extra
|
||||
specs when RBAC was enabled. For more details, please refer to
|
||||
`Launchpad bug <https://bugs.launchpad.net/manila-ui/+bug/2004165>`_
|
Loading…
Reference in New Issue