Skip to content

Commit

Permalink
Fixes #37763 - content_view_environments should always be an array (K…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz authored Aug 30, 2024
1 parent c2146ec commit a4f1baf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ def find_content_view_environments
end
elsif params.key?(:organization_id) && !params.key?(:environment_id) && !params.key?(:environments)
organization = Organization.current
environments = organization.library.content_view_environment
environments = [organization.library.content_view_environment]
elsif User.current.default_organization.present?
environments = User.current.default_organization.library.content_view_environment
environments = [User.current.default_organization.library.content_view_environment]
else
fail HttpErrors::NotFound, _("User '%s' did not specify an organization ID and does not have a default organization.") % current_user.login
end
Expand Down

0 comments on commit a4f1baf

Please sign in to comment.