Skip to content

Commit

Permalink
Backport decidim#4852 to 0.16 stable (decidim#4855)
Browse files Browse the repository at this point in the history
* Backport decidim#4852 to 0.16-stable

* Add CHANGELOG entry
  • Loading branch information
Aitor Lopez Beltran authored and oriolgual committed Feb 16, 2019
1 parent 8ecaa23 commit 7f6129e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@

**Fixed**:

- **decidim-assemblies**: Fix parent assemblies children_count counter (add migration) [\#4855](https://github.com/decidim/decidim/pull/4855/)
- **decidim-assemblies**: Fix parent assemblies children_count counter [\#4847](https://github.com/decidim/decidim/pull/4847/)
- **decidim-proposals**: Fix Proposals Last Activity feed. [\#4836](https://github.com/decidim/decidim/pull/4836)
- **decidim-proposals**: Fix attachments not being inherited from collaborative draft when published as proposal. [\#4815](https://github.com/decidim/decidim/pull/4815)
Expand Down
@@ -0,0 +1,8 @@
# frozen_string_literal: true

class ResetNegativeChildrenCountCounters < ActiveRecord::Migration[5.2]
def change
ids = Decidim::Assembly.where("children_count < 0").pluck(:id)
ids.each { |id| Decidim::Assembly.reset_counters(id, :children_count) }
end
end

0 comments on commit 7f6129e

Please sign in to comment.