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

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