ifc5d - strip " Cost" suffix when importing csv

" Cost" is a suffix is added on export, so it makes to get rid of it on import.
This commit is contained in:
Andrej730
2025-04-21 16:59:30 +05:00
parent c6176d364f
commit 908bf02098
+4 -1
View File
@@ -157,7 +157,10 @@ class Csv2Ifc:
else:
# Very fragile part of the code.
self.categories = { # pyright: ignore [reportAttributeAccessIssue]
name: index for name, index in self.headers.items() if name not in MAIN_CSV_HEADER_COLUMNS
# ' Cost' is a sufix added on export.
name.removesuffix(" Cost"): index
for name, index in self.headers.items()
if name not in MAIN_CSV_HEADER_COLUMNS
}
if self.categories:
print(