diff --git a/pyproject.toml b/pyproject.toml index 30e4649..d4e833c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ maintainers = [ {name = "Tim Holzheim", email = "tim.holzheim@rwth-aachen.de"}, ] -version = "0.0.14" +version = "0.0.15" readme = "README.md" license= "Apache-2.0" dependencies = [ diff --git a/src/wikibasemigrator/migrator.py b/src/wikibasemigrator/migrator.py index 2fa0ac8..58f953c 100644 --- a/src/wikibasemigrator/migrator.py +++ b/src/wikibasemigrator/migrator.py @@ -836,10 +836,11 @@ def add_migration_mark_to_entity( :param migration_mark: :return: """ - if migration_mark is None: + if migration_mark is None or migration_mark: return claim = migration_mark.get_claim() - EntityMerger().merge_statement(claim, translation.entity) + if claim is not None: + EntityMerger().merge_statement(claim, translation.entity) @staticmethod def _migrate_entity( diff --git a/src/wikibasemigrator/model/migration_mark.py b/src/wikibasemigrator/model/migration_mark.py index fd8c78d..dd8edce 100644 --- a/src/wikibasemigrator/model/migration_mark.py +++ b/src/wikibasemigrator/model/migration_mark.py @@ -34,7 +34,7 @@ def get_claim(self) -> datatypes.BaseDataType | None: Get the migration mark as claim :return: """ - if self.value is None: + if self.value is None or self.value == "": return None claim = None match self.property_type: