mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
82f73c29ea
When replacing a style on an item whose previous IfcStyledItem wraps its styles in the deprecated IfcPresentationStyleAssignment, and the assignment is not being reused (use_style_assignment is False, e.g. an IFC4 file authored by AVEVA E3D), the else branch called remove_same_type_styles(style_assignment) with style_assignment still None, raising AttributeError: 'NoneType' object has no attribute 'Styles'. Operate on style_, the assignment found in the current iteration, instead of the accumulator. Verified red-green with a minimal IFC4 file using IfcPresentationStyleAssignment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>