Skip to content

Commit

Permalink
fix bug in SanStream.impact_item
Browse files Browse the repository at this point in the history
  • Loading branch information
yalinli2 committed Nov 12, 2024
1 parent b494632 commit cac89b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qsdsan/_impact_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def linked_stream(self, new_s):
f'is replaced with {self.ID}.')
else:
warn(f'The original `StreamImpactItem` linked to stream {new_s.ID} '
f'is replaced with upon the creation of a new stream.')
f'is replaced upon the creation of a new stream.')
new_s._stream_impact_item = self
self._linked_stream = new_s

Expand Down
3 changes: 2 additions & 1 deletion qsdsan/_sanstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,13 @@ def copy_flow(self, other, IDs=..., *, remove=False, exclude=False):
--------
:func:`copy` for the differences between ``copy``, ``copy_like``, and ``copy_flow``.
'''
stream_impact_item = self.stream_impact_item
Stream.copy_flow(self, other=other, IDs=IDs, remove=remove, exclude=exclude)

if not isinstance(other, SanStream):
return

self._stream_impact_item = None
self._stream_impact_item = stream_impact_item


def flow_proxy(self, ID=None):
Expand Down

0 comments on commit cac89b3

Please sign in to comment.