entity.py
branchstable
changeset 6124 c5900230809b
parent 6100 3cd1e6a74830
child 6142 8bc6eac1fac1
child 6258 9b5c008267b0
--- a/entity.py	Fri Aug 20 08:15:06 2010 +0200
+++ b/entity.py	Fri Aug 20 08:16:03 2010 +0200
@@ -712,7 +712,9 @@
             selected.append((attr, var))
         # +1 since this doen't include the main variable
         lastattr = len(selected) + 1
-        if attributes is None:
+        # don't fetch extra relation if attributes specified or of the entity is
+        # coming from an external source (may lead to error)
+        if attributes is None and self.cw_metainformation()['source']['uri'] == 'system':
             # fetch additional relations (restricted to 0..1 relations)
             for rschema, role in self._cw_to_complete_relations():
                 rtype = rschema.type