server/sources/pyrorql.py
changeset 7399 972ed1843bd8
parent 7398 26695dd703d8
child 7514 32081892850e
--- a/server/sources/pyrorql.py	Thu May 19 10:53:11 2011 +0200
+++ b/server/sources/pyrorql.py	Thu May 19 10:53:17 2011 +0200
@@ -234,8 +234,10 @@
         etype, dexturi, dextid = cnx.describe(extid)
         if dexturi == 'system' or not (
             dexturi in self.repo.sources_by_uri or self._skip_externals):
-            return self.repo.extid2eid(self, str(extid), etype, session), True
-        if dexturi in self.repo.sources_by_uri:
+            eid = self.repo.extid2eid(self, str(extid), etype, session)
+            if eid > 0:
+                return eid, True
+        elif dexturi in self.repo.sources_by_uri:
             source = self.repo.sources_by_uri[dexturi]
             cnx = session.cnxset.connection(source.uri)
             eid = source.local_eid(cnx, dextid, session)[0]