fix bug in bonsai bcf v3 api

it wasn't setting reference links / document references / labels if Topic container for them wasn't created before
This commit is contained in:
Andrej730
2024-08-21 16:58:31 +05:00
parent 9b12cae8b4
commit ad77d09916
-3
View File
@@ -95,7 +95,6 @@ class Bcf(bonsai.core.tool.Bcf):
if not document_references:
return
topic_.document_references = (topic_document_references := bcf.v3.model.TopicDocumentReferences())
return
topic_document_references.document_reference = document_references
@classmethod
@@ -163,7 +162,6 @@ class Bcf(bonsai.core.tool.Bcf):
if not labels:
return
topic_.labels = (topic_labels := bcf.v3.model.TopicLabels())
return
topic_labels.label = labels
@classmethod
@@ -186,7 +184,6 @@ class Bcf(bonsai.core.tool.Bcf):
if not reference_links:
return
topic_.reference_links = (topic_links := bcf.v3.model.TopicReferenceLinks())
return
topic_links.reference_link = reference_links
@classmethod