Fix UnhashableKeyWarning when calling get_security_groups function
Memoized caches function specifies use tuples as parameters because
lists are not hashable. When the get_security_groups function is called,
the list type parameter is passed in, this causing fail to use memoized
and the console appears UnhashableKeyWarning.
Closes-Bug:#1712582
@@ -142,7 +142,8 @@ class DetailView(tabs.TabbedTableView):
port.network_url = reverse(network_url, args=[port.network_id])
for ip in port.fixed_ips:
ip['subnet_url'] = reverse(subnet_url, args=[ip['subnet_id']])
- port.security_groups = self.get_security_groups(port.security_groups)
+ port.security_groups = self.get_security_groups(
+ tuple(port.security_groups))
table = project_tables.PortsTable(self.request,
network_id=port.network_id)
# TODO(robcresswell) Add URL for "Ports" crumb after bug/1416838
