From 4f3397a04e5deb8a1a2b2b8a8a23b2ff06bbbdd9 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 1 Mar 2024 16:42:38 +1100 Subject: [PATCH] Fix #4333. Ensure order of info is correct for valid IDSes. --- src/ifctester/ifctester/ids.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ifctester/ifctester/ids.py b/src/ifctester/ifctester/ids.py index 6f4b1d5070..b18b162e94 100644 --- a/src/ifctester/ifctester/ids.py +++ b/src/ifctester/ifctester/ids.py @@ -81,12 +81,16 @@ class Ids: self.info["milestone"] = milestone def asdict(self): + info = {} + for attr in ["title", "copyright", "version", "description", "author", "date", "purpose", "milestone"]: + if attr in self.info: + info[attr] = self.info[attr] ids_dict = { "@xmlns": "http://standards.buildingsmart.org/IDS", "@xmlns:xs": "http://www.w3.org/2001/XMLSchema", "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", "@xsi:schemaLocation": "http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.6/ids.xsd", - "info": self.info, + "info": info, "specifications": {"specification": []}, } for spec in self.specifications: