Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a bug? doc_methods_controller line 38 contains an error field id instead of user_id #1598

Open
carlosdanielpohlod opened this issue Dec 2, 2021 · 0 comments

Comments

@carlosdanielpohlod
Copy link

carlosdanielpohlod commented Dec 2, 2021

An field error who makes the SELECT don´t be able to find the dabase data

Expected Behavior

The wrong field as a param make an SELECT error

Possible Solution

fix id to user_id

Context

The issue appeared to me while i´m make automated tests for this class

method:
doc_methods_controller (class)

`def click_source_redirect

doc        = DocMethod.find(params[:id])

sub        = RepoSubscription.find_by!(id: params[:user_id], repo: doc.repo)

assignment = DocAssignment.find_by!(doc_method_id: doc.id, repo_subscription_id: sub.id)

`
The RepoSusbcription are find by the id, but using user_id instead of the RepoSubscription id

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

No branches or pull requests

1 participant