mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
12252 code review changes
This commit is contained in:
parent
bc9feb4a57
commit
875db2e33b
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user