Fix UnknownAttributeError on NetworkHost.create#3601
Open
sethumadh wants to merge 1 commit into
Open
Conversation
…osts The network_hosts table has no 'port' column, so passing port: to NetworkHost.create raised ActiveModel::UnknownAttributeError. Removed the invalid port: argument. Fixes beefproject#3573
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Category
Bug
Feature/Issue Description
Q: Please give a brief summary of your feature/fix
A: Fixes #3573. The
get_ntop_network_hostsmodule crashed when saving adiscovered network host, because it passed a
port:value toNetworkHost.create— but thenetwork_hoststable has noportcolumn. Thisraised
ActiveModel::UnknownAttributeErrorat runtime.Q: Give a technical rundown of what you have changed (if applicable)
A: In
modules/network/get_ntop_network_hosts/module.rb, the call on line 34was passing an attribute that does not exist on the model: