Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels