Skip to content

Commit

Permalink
refactor: indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Stef-Rousset committed Aug 20, 2024
1 parent 7f3dc26 commit 9eb9f6a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def call

def update_later_proposals_title(component, value, is_article, locale)
proposals = Decidim::Proposals::Proposal.drafts.where(decidim_component_id: component.id)
.where(participatory_text_level: "article")
.select { |proposal| proposal.title[locale].split.last.to_i > value }
.where(participatory_text_level: "article")
.select { |proposal| proposal.title[locale].split.last.to_i > value }
if proposals.any? && is_article
proposals.sort_by(&:id).each_with_index do |proposal, index|
proposal.update(title: { "#{locale}": "#{I18n.t("decidim.proposals.admin.participatory_texts.discard.paragraph")} #{value + index}" })
Expand Down

0 comments on commit 9eb9f6a

Please sign in to comment.