Skip to content

Manage not found on connection edit - #812

Open
moxyom wants to merge 5 commits into
nanego:masterfrom
pantographe:manage-not-found-on-connection-edit
Open

Manage not found on connection edit#812
moxyom wants to merge 5 commits into
nanego:masterfrom
pantographe:manage-not-found-on-connection-edit

Conversation

@moxyom

@moxyom moxyom commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

params[:connection][:vlans],
params[:connection][:special_case],
params[:connection][:comments])
if params[:connection][:to_port_id].presence

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if params[:connection][:to_port_id].present?

or

if to_port_id = params[:connection][:to_port_id].presence

@to_server = to_port.server
else
# destroy connections if to_port_id set to null
from_port.connections.each do |connection|

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why destroying connection? Did you notice case where it was needed?

I don't say it's not a good idea, just I want to know what makes you add this

connection.destroy
end

from_port.update(vlans: "", color: "", cablename: "")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better update with values from form. With this solution I can't, for example, add a Vlan to a port without connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants