Skip to content

Commit

Permalink
hotfix: debates
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Froger committed Nov 4, 2024
1 parent f049df1 commit 5d4a658
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/jobs/decidim/geo/update_debate_geo_index_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ class UpdateDebateGeoIndexJob < ::ApplicationJob
alias debate resource
alias debate= resource=

def perform(meeting_id)
@resource_id = meeting
@resource = Decidim::Debates::Debate.where(id: meeting_id).first
def perform(debate_id)
@resource_id = debate_id
@resource = Decidim::Debates::Debate.where(id: debate_id).first
return remove_debate unless resource
sync_meeting
sync_debate
end

private

def sync_meeting
def sync_debate
return remove_debate if remove_from_index?

upsert_index(debate.id, manifest_name,
Expand Down

0 comments on commit 5d4a658

Please sign in to comment.