Skip to content

Commit

Permalink
fix(serializer): Fix PhysicalComponent serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Dec 12, 2023
1 parent ee8e1bc commit a8f6566
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions capella2polarion/elements/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,8 @@ def _include_nature_in_type(
"""Return attributes for a ``PhysicalComponent``."""
work_item = _include_actor_in_type(obj, ctx)
xtype = work_item.type
if obj.nature is not None:
# pylint: disable-next=attribute-defined-outside-init
work_item.type = f"{xtype}{obj.nature.name.capitalize()}"
nature = [obj.nature.name, ""][obj.nature == "UNSET"]
work_item.type = f"{xtype}{nature.capitalize()}"
return work_item


Expand Down

0 comments on commit a8f6566

Please sign in to comment.