From d405530eb9b31c24f8873561ab22e9b96648bea3 Mon Sep 17 00:00:00 2001 From: Sunny Sun <38218185+sunnyosun@users.noreply.github.com> Date: Mon, 10 Oct 2022 21:49:59 +0200 Subject: [PATCH] :bug: Fixed dobject_biometa entry insertion --- lamindb/db/ingest/_link_ingest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lamindb/db/ingest/_link_ingest.py b/lamindb/db/ingest/_link_ingest.py index b400d887f..75ab87f42 100644 --- a/lamindb/db/ingest/_link_ingest.py +++ b/lamindb/db/ingest/_link_ingest.py @@ -112,4 +112,8 @@ def biometa(self, biometa: wetlab.biometa) -> None: link_entry = query.dobject_biometa( # type: ignore dobject_id=dobject_id, biometa_id=result.id ).one_or_none() + if link_entry is None: + link_entry = wetlab.dobject_biometa( + dobject_id=dobject_id, biometa_id=result.id + ) self.add_entry("dobject_biometa", link_entry)