Skip to content

Commit

Permalink
revert: Revert work item None removal
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Feb 27, 2024
1 parent ea3c7ea commit 0279eb1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions capella2polarion/converters/element_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,8 @@ def __init__(

def serialize_all(self) -> list[data_models.CapellaWorkItem]:
"""Serialize all items of the converter_session."""
work_items = {
uuid: self.serialize(uuid) for uuid in self.converter_session
}
for uuid, work_item in work_items.items():
if work_item is None:
del self.converter_session[uuid]
return list(filter(None, work_items.values()))
work_items = [self.serialize(uuid) for uuid in self.converter_session]
return list(filter(None, work_items))

def serialize(self, uuid: str) -> data_models.CapellaWorkItem | None:
"""Return a CapellaWorkItem for the given diagram or element."""
Expand Down

0 comments on commit 0279eb1

Please sign in to comment.