app/forms/decidim/initiatives/vote_form.rb in decidim-initiatives-0.27.0 vs app/forms/decidim/initiatives/vote_form.rb in decidim-initiatives-0.27.1
- old
+ new
@@ -81,9 +81,10 @@
#
# Returns a Decidim::Scope.
def user_authorized_scope
return scope if handler_name.blank?
return unless authorized?
+ return if authorization.metadata.blank?
@user_authorized_scope ||= authorized_scope_candidates.find do |scope|
scope&.id == authorization.metadata.symbolize_keys[:scope_id]
end
end