Minor BCF fix

This commit is contained in:
Dion Moult
2021-07-07 11:44:04 +10:00
parent 56633b8126
commit 1f128fd7e4
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -16,12 +16,14 @@ def load(filepath):
bcfxml = BcfXml()
bcfxml.filepath = filepath
return bcfxml
else:
elif version_id == "3.0":
from bcf.v3.bcfxml import BcfXml
bcfxml = BcfXml()
bcfxml.filepath = filepath
return bcfxml
else:
raise Exception(f"Version {version_id} not supported.")
def get_version(version_path):
+2 -2
View File
@@ -151,10 +151,10 @@ class BcfXml:
if value in data["Topic"]:
setattr(topic, key, data["Topic"][value])
if "ReferenceLinks" in data["Topic"]:
if data["Topic"].get("ReferenceLinks"):
topic.reference_links.extend(data["Topic"]["ReferenceLinks"].get("ReferenceLink", []))
if "Labels" in data["Topic"]:
if data["Topic"].get("Labels"):
topic.labels.extend(data["Topic"]["Labels"].get("Label", []))
if "BimSnippet" in data["Topic"]: