-
Notifications
You must be signed in to change notification settings - Fork 51
Upload dp err2 #1554
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
base: master
Are you sure you want to change the base?
Upload dp err2 #1554
Conversation
8bced40
to
b7fc5f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes.
data_provider_id = params[:data_provider_id] | ||
data_provider_id = params[:data_provider_id] | ||
|
||
DataProvider.find_accessible_by_user(data_provider_id, current_user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment line just above this new line, something like:
# Verify that the DP is accessible to the user; this will raise an exception otherwise
allow(Message).to receive(:send_message) | ||
allow(File).to receive(:delete) | ||
allow(controller).to receive(:system) | ||
allow(DataProvider).to receive(:find_accessible_by_user).and_return([data_provider]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be:
and_return(data_provider)
(Not an array with the DP, a single DP object)
An alternative or perhaps complimentary bugfix at upload to wrong dp id
I'd merge this one and #1545 just in the case - it is quite possible the model issue may manifest itself in some other context