232 |
232 |
233 def local_eid(self, cnx, extid, session): |
233 def local_eid(self, cnx, extid, session): |
234 etype, dexturi, dextid = cnx.describe(extid) |
234 etype, dexturi, dextid = cnx.describe(extid) |
235 if dexturi == 'system' or not ( |
235 if dexturi == 'system' or not ( |
236 dexturi in self.repo.sources_by_uri or self._skip_externals): |
236 dexturi in self.repo.sources_by_uri or self._skip_externals): |
237 return self.repo.extid2eid(self, str(extid), etype, session), True |
237 eid = self.repo.extid2eid(self, str(extid), etype, session) |
238 if dexturi in self.repo.sources_by_uri: |
238 if eid > 0: |
|
239 return eid, True |
|
240 elif dexturi in self.repo.sources_by_uri: |
239 source = self.repo.sources_by_uri[dexturi] |
241 source = self.repo.sources_by_uri[dexturi] |
240 cnx = session.cnxset.connection(source.uri) |
242 cnx = session.cnxset.connection(source.uri) |
241 eid = source.local_eid(cnx, dextid, session)[0] |
243 eid = source.local_eid(cnx, dextid, session)[0] |
242 return eid, False |
244 return eid, False |
243 return None, None |
245 return None, None |