Commit 9e75c3e
committed
refactor(assets): Optimize list_microgrid_electrical_component_connections method
This commit refactors the `list_microgrid_electrical_component_connections` method in the `AssetsApiClient` class to use `map` and `filter` for improved readability and performance. The method now filters out any falsey connections before mapping them to the appropriate component connection objects.
Signed-off-by: eduardiazf <[email protected]>1 parent 950965d commit 9e75c3e
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
0 commit comments