Commit 552e334f authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[entities] Rename variable to container to avoid name conflict

since it's not the same thing as the entity received in arguments.
parent 5bfec4248b69
......@@ -100,13 +100,13 @@ def component_unit(cls, req, rset=None, entity=None, **kwargs):
@objectify_predicate
def simplified_profile(cls, req, rset=None, entity=None, **kwargs):
"""Predicate returning 1 score if context entity is within a simplified profile."""
entity = _seda_container_from_context(rset, entity, **kwargs)
if entity is None:
container = _seda_container_from_context(rset, entity, **kwargs)
if container is None:
return 0
if entity.cw_etype == 'SEDAArchiveUnit':
if container.cw_etype == 'SEDAArchiveUnit':
# XXX archive unit component, for now suppose it's "simplified"
return 1
return 1 if entity.simplified_profile else 0
return 1 if container.simplified_profile else 0
def is_full_seda2_profile(entity=None, rset=None, **kwargs):
......
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