Commit 4dac92dd authored by Vincent Pelletier's avatar Vincent Pelletier

ZSQLCatalog.SQLCatalog: Pass sql_catalog_id to getDynamicRelatedKeyList.

Also, get rid of single-use locals and unneeded list copy.
parent 1799a601
......@@ -1971,11 +1971,10 @@ class Catalog(Folder,
if key_list is None:
key_list = []
column_map = self._getSQLCatalogRelatedKeySet()
# Do not generate dynamic related key for acceptable_keys
dynamic_key_list = [k for k in key_list if k not in column_map]
dynamic_list = self.getDynamicRelatedKeyList(dynamic_key_list)
full_list = list(dynamic_list) + list(self.sql_catalog_related_keys)
return full_list
return self.getDynamicRelatedKeyList(
[k for k in key_list if k not in column_map],
sql_catalog_id=self.id,
) + list(self.sql_catalog_related_keys)
# Compatibililty SQL Sql
getSqlCatalogRelatedKeyList = getSQLCatalogRelatedKeyList
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment