Fix list call when search_opts isn't provided

Added line to the list implementation versions 2.35 to 2.68 to point
the search_opts variable to an empty dict if it was set to none.

Closes-bug: #1967312
Change-Id: Ibbd95047ad082665c323f58b735e843d32001c45
This commit is contained in:
sdailey 2022-04-12 17:09:28 +00:00 committed by Goutham Pacha Ravi
parent 64f58141bb
commit d66d7b1d14
1 changed files with 2 additions and 0 deletions

View File

@ -357,6 +357,8 @@ class ShareManager(base.MetadataCapableManager):
def list(self, detailed=True, search_opts=None, # noqa
sort_key=None, sort_dir=None, return_raw=False):
"""Get a list of all shares."""
if search_opts is None:
search_opts = {}
search_opts.pop("is_soft_deleted", None)
return self.do_list(detailed=detailed, search_opts=search_opts,
sort_key=sort_key, sort_dir=sort_dir,