Commit f61380a5 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[ms entity] proper error on external entity fetch error

parent 75112ff0511d
......@@ -633,7 +633,11 @@ class Entity(AppObject):
# if some outer join are included to fetch inlined relations
rql = 'Any %s,%s %s' % (V, ','.join(var for attr, var in selected),
','.join(rql))
rset = self._cw.execute(rql, {'x': self.eid}, build_descr=False)[0]
try:
rset = self._cw.execute(rql, {'x': self.eid}, build_descr=False)[0]
except IndexError:
raise Exception('unable to fetch attributes for entity with eid %s'
% self.eid)
# handle attributes
for i in xrange(1, lastattr):
self.cw_attr_cache[str(selected[i-1][0])] = rset[i]
......
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