# HG changeset patch # User Sylvain Thénault # Date 1282284963 -7200 # Node ID c5900230809bf4675e9b52f1207ddc7ff5dafe1f # Parent 0d0a87e88281e756e7b5cbdead1e26c49c20a6e3 [ms] when entity is coming from an external source, don't add non final relations on complete diff -r 0d0a87e88281 -r c5900230809b entity.py --- 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