Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flixopt/flow_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,14 @@ def _connect_network(self):

# Add Bus if not already added (deprecated)
if flow._bus_object is not None and flow._bus_object not in self.buses.values():
self._add_buses(flow._bus_object)
warnings.warn(
f'The Bus {flow._bus_object.label} was added to the FlowSystem from {flow.label_full}.'
f'This is deprecated and will be removed in the future. '
f'Please pass the Bus.label to the Flow and the Bus to the FlowSystem instead.',
UserWarning,
DeprecationWarning,
stacklevel=1,
)
self._add_buses(flow._bus_object)

# Connect Buses
bus = self.buses.get(flow.bus)
Expand Down