Skip to content

Commit

Permalink
Fix dropping of data on connection deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
fwitte committed Jan 21, 2024
1 parent d67e72e commit 3d9ff3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tespy/networks/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,10 @@ def del_conns(self, *args):
comps = list({cp for c in args for cp in [c.source, c.target]})
for c in args:
self.conns.drop(c.label, inplace=True)
self.results["Connection"].drop(c.label, inplace=True)
if "Connection" in self.results:
self.results["Connection"].drop(
c.label, inplace=True, errors="ignore"
)
msg = ('Deleted connection ' + c.label + ' from network.')
logger.debug(msg)

Expand Down

0 comments on commit 3d9ff3b

Please sign in to comment.