Skip to content
Snippets Groups Projects

Retrieve children elements from SQLite cache in list_element_children

Merged Eva Bardou requested to merge use-local-cache into master
All threads resolved!
2 files
+ 13
45
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 7
6
@@ -845,12 +845,13 @@ class ElementsWorker(BaseWorker):
), "worker_version should be of type str"
query_params["worker_version"] = worker_version
# Checking that we only have query_params handled by the cache
if self.use_cache and set(query_params.keys()) <= {
"name",
"type",
"worker_version",
}:
if self.use_cache:
# Checking that we only received query_params handled by the cache
assert set(query_params.keys()) <= {
"name",
"type",
"worker_version",
}, "When using the local cache, you can only filter by 'name', 'type' and/or 'worker_version'"
parent_id_hex = convert_str_uuid_to_hex(element.id)
name_condition = f" AND name LIKE '%{name}%'" if name else ""
type_condition = f" AND type='{type}'" if type else ""
Loading