filbertkm / WikibaseImport

Import entities from another Wikibase instance (e.g. Wikidata)
GNU General Public License v2.0
28 stars 18 forks source link

Search entities in the correct namespace #39

Closed lucaswerkmeister closed 5 years ago

lucaswerkmeister commented 5 years ago

Instead of assuming that all entities are in namespace 0 (which is only true in a Wikidata-like installation, but not in a default Wikibase installation, and even then only for items, not properties), take the actual namespace of the requested entity from an injected EntityNamespaceLookup.

Also, if we can’t find the entity, throw an exception instead of returning count 0: it’s better to fail the import than to duplicate statements.

Fixes #22.

lucaswerkmeister commented 5 years ago

Sorry, wrong repository.