Commit b08f4824 authored by Jérôme Roy's avatar Jérôme Roy
Browse files

[entity] User-defined relation to skip for copy has precedence

Otherwise permission problems can occur on rtypes not yet skipped

Closes #3653459

--HG--
branch : stable
parent 048d6de92b63
......@@ -790,13 +790,13 @@ class Entity(AppObject):
assert role in ('subject', 'object'), role
skip_copy_for[role].add(rtype)
for rschema in self.e_schema.subject_relations():
if rschema.type in skip_copy_for['subject']:
continue
if rschema.final or rschema.meta:
continue
# skip already defined relations
if getattr(self, rschema.type):
continue
if rschema.type in skip_copy_for['subject']:
continue
# skip composite relation
rdef = self.e_schema.rdef(rschema)
if rdef.composite:
......
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