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

Reset Decidim::ApplicationUploader#validate_inside_organization to original definition #324

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/uploaders/decidim/application_uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ def validate_inside_organization
return if model.is_a?(Decidim::Organization)
return if model.respond_to?(:organization) && model.organization.is_a?(Decidim::Organization)

# HACK: Temporary fix for https://github.com/decidim/decidim/issues/6720
# If this is fixed by decidim, this file (application_uploader.rb)
# should be deleted to keep in sync with upstream!
return if model.class.to_s == "decidim/hero_homepage_content_block"
# Fix for https://github.com/codeforjapan/decidim-cfj/issues/101
return if model.nil?

raise CarrierWave::IntegrityError, I18n.t("carrierwave.errors.not_inside_organization")
end
end
Expand Down