[entity] User-defined relation to skip for copy has precedence
Otherwise permission problems can occur on rtypes not yet skipped
Closes #3653459
--- a/entity.py Wed Feb 26 14:50:13 2014 +0100
+++ b/entity.py Fri Mar 14 15:19:31 2014 +0100
@@ -790,13 +790,13 @@
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: