Commit 45a87733 authored by Vincent Pelletier's avatar Vincent Pelletier

ZSQLCatalog.SQLCatalog: Make scriptable keys consistent with other types.

Scriptable keys are already handled by other branches below.
If one wants to provide a string or dict value to a scriptable key, they
need to wrap it into another type to disable catalog processing of these
values.
parent 0267e440
...@@ -2034,7 +2034,6 @@ class Catalog(Folder, ...@@ -2034,7 +2034,6 @@ class Catalog(Folder,
# We have an empty value, do not create a query from it # We have an empty value, do not create a query from it
empty_value_dict[key] = value empty_value_dict[key] = value
else: else:
script = self.getScriptableKeyScript(key)
if isinstance(value, dict): if isinstance(value, dict):
# Dictionnary: might contain the search key to use. # Dictionnary: might contain the search key to use.
search_key_name = value.get('key') search_key_name = value.get('key')
...@@ -2049,8 +2048,6 @@ class Catalog(Folder, ...@@ -2049,8 +2048,6 @@ class Catalog(Folder,
if isinstance(value, BaseQuery): if isinstance(value, BaseQuery):
# Query instance: use as such, ignore key. # Query instance: use as such, ignore key.
result = value result = value
elif script is not None:
result = script(value)
elif isinstance(value, (basestring, dict)): elif isinstance(value, (basestring, dict)):
# String: parse using key's default search key. # String: parse using key's default search key.
raw_value = value raw_value = value
......
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