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

Add a safety belt when cube is used with other ones (eg in saem)

parent 38c8d9a12bcc
......@@ -72,6 +72,9 @@ def parent_and_container(entity):
def _transfer_from_context(rset, entity):
if entity is None:
entity =
# protect against unrelated entity types
if not entity.cw_etype.startswith('SEDA'):
return None
if entity.cw_etype != 'SEDAArchiveTransfer':
entity = parent_and_container(entity)[1]
return entity
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