From c2049246cdc51e7ab6b0018bd26874daeacc9e5c Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 15 May 2024 16:01:06 +0500 Subject: [PATCH] fix issue adding classification failing to use a None value for the date --- .../ifcopenshell/api/classification/add_classification.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py index ee72bd7585..d0e18d265e 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py @@ -110,7 +110,9 @@ class Usecase: "IfcCalendarDate", **ifcopenshell.util.date.datetime2ifc(edition_date, "IfcCalendarDate") ) else: - result.EditionDate = ifcopenshell.util.date.datetime2ifc(edition_date, "IfcDate") + if edition_date: + edition_date = ifcopenshell.util.date.datetime2ifc(edition_date, "IfcDate") + result.EditionDate = edition_date self.relate_to_project(result)