Skip to content

Commit

Permalink
feat(importer): Don't delete descriptions
Browse files Browse the repository at this point in the history
If the ROS messages don't have a description for an object, keep the
current description in the Capella model unchanged. This allows adding
descriptions in the Capella model manually if they're not present in the
imported ROS messages package.

Fixes #11
  • Loading branch information
Wuestengecko committed Nov 4, 2024
1 parent d8d356d commit b2b15f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions capella_ros_tools/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ def _convert_class(
"find": {
"name": msg_def.name,
},
"set": {
"description": msg_def.description,
},
"set": (
{"description": msg_def.description}
if msg_def.description
else {}
),
"sync": {
"properties": props,
},
Expand Down

0 comments on commit b2b15f8

Please sign in to comment.