Skip to content

Conversation

@MontrealSergiy
Copy link
Contributor

@MontrealSergiy MontrealSergiy commented Sep 23, 2025

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

@MontrealSergiy MontrealSergiy self-assigned this Sep 23, 2025
@MontrealSergiy MontrealSergiy added the API API issues or Swagger description label Sep 23, 2025
@MontrealSergiy MontrealSergiy linked an issue Sep 23, 2025 that may be closed by this pull request
Copy link
Member

@prioux prioux left a 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)
Copy link
Member

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])
Copy link
Member

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)

@MontrealSergiy MontrealSergiy requested a review from prioux October 14, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API API issues or Swagger description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

500 http status when uploading to deleted data provider

2 participants