12252 code review changes

This commit is contained in:
Arthur 2023-04-27 08:02:41 -07:00
parent bc9feb4a57
commit 875db2e33b

View File

@ -145,12 +145,11 @@ class CachedValueSearchBackend(SearchBackend):
) )
# Omit any results pertaining to an object the user does not have permission to view # Omit any results pertaining to an object the user does not have permission to view
ret = [ ret = []
r for r in results if r.object is not None for r in results:
] if r.object is not None:
for r in ret: r.name = str(r.object)
r.name = str(r.object) ret.append(r)
return ret return ret
def cache(self, instances, indexer=None, remove_existing=True): def cache(self, instances, indexer=None, remove_existing=True):