Commit c7583f40 authored by David Mendez's avatar David Mendez
Browse files

make pylint happy

parent 7f5da45b
......@@ -127,18 +127,7 @@ class GroupConfiguration:
index_name,
property_id
)
is_virtual = property_config.get('is_virtual', False)
is_contextual = property_config.get('is_contextual', False)
# If is virtual and non contextual, include the property on which it is based
if is_virtual and not is_contextual:
based_property_id = property_config.get('based_on')
properties_identified.add(based_property_id)
# Add normal properties
if not is_virtual and not is_contextual:
properties_identified.add(property_id)
# Ignore virtual contextual properties
add_property_identifier_to_set(property_config, properties_identified, property_id)
seconds_valid = RUN_CONFIG.get('es_mappings_cache_seconds')
cache.fail_proof_set(key=cache_key, value=properties_identified, timeout=seconds_valid)
......@@ -146,6 +135,28 @@ class GroupConfiguration:
return list(properties_identified)
def add_property_identifier_to_set(property_config, properties_set, property_id):
"""
Adds the property id to the set of ids, the final property id can be different if it is virtual
:param property_config: configuration of the property
:param properties_set: set to which add the id
:param property_id: original id of the property
"""
is_virtual = property_config.get('is_virtual', False)
is_contextual = property_config.get('is_contextual', False)
# If is virtual and non contextual, include the property on which it is based
if is_virtual and not is_contextual:
based_property_id = property_config.get('based_on')
properties_set.add(based_property_id)
# Add normal properties
if not is_virtual and not is_contextual:
properties_set.add(property_id)
# Ignore virtual contextual properties
def get_groups_configuration_instance():
"""
:return: a default instance for the groups configuration
......
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