Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
9705a695191b
Commit
552e334f
authored
Apr 21, 2017
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_seda/entities/__init__.py
View file @
9705a695
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment