Remove unused params named "context" in filter_attributes
The param named "context" is unused in api/v2/base.py. Remove these params. Change-Id: I64295b117a817488185f44ea586b71640fd48a75
This commit is contained in:
parent
97c491294c
commit
846b83f0ff
|
@ -169,9 +169,9 @@ class Controller(object):
|
|||
"""
|
||||
fields_to_strip = ((fields_to_strip or []) +
|
||||
self._exclude_attributes_by_policy(context, data))
|
||||
return self._filter_attributes(context, data, fields_to_strip)
|
||||
return self._filter_attributes(data, fields_to_strip)
|
||||
|
||||
def _filter_attributes(self, context, data, fields_to_strip=None):
|
||||
def _filter_attributes(self, data, fields_to_strip=None):
|
||||
if not fields_to_strip:
|
||||
return data
|
||||
return dict(item for item in six.iteritems(data)
|
||||
|
@ -288,8 +288,7 @@ class Controller(object):
|
|||
fields_to_strip += self._exclude_attributes_by_policy(
|
||||
request.context, obj_list[0])
|
||||
collection = {self._collection:
|
||||
[self._filter_attributes(
|
||||
request.context, obj,
|
||||
[self._filter_attributes(obj,
|
||||
fields_to_strip=fields_to_strip)
|
||||
for obj in obj_list]}
|
||||
pagination_links = pagination_helper.get_links(obj_list)
|
||||
|
@ -363,7 +362,6 @@ class Controller(object):
|
|||
fields_to_strip = self._exclude_attributes_by_policy(
|
||||
request.context, item)
|
||||
objs.append(self._filter_attributes(
|
||||
request.context,
|
||||
obj_creator(request.context, **kwargs),
|
||||
fields_to_strip=fields_to_strip))
|
||||
return objs
|
||||
|
@ -499,7 +497,7 @@ class Controller(object):
|
|||
fields_to_strip = self._exclude_attributes_by_policy(
|
||||
request.context, objs[0])
|
||||
return notify({self._collection: [self._filter_attributes(
|
||||
request.context, obj, fields_to_strip=fields_to_strip)
|
||||
obj, fields_to_strip=fields_to_strip)
|
||||
for obj in objs]})
|
||||
else:
|
||||
if self._collection in body:
|
||||
|
|
Loading…
Reference in New Issue