Skip to content

Fix budgets seeds on non development apps#9585

Merged
ahukkanen merged 1 commit intodevelopfrom
fix/budgets-seeds-non-development-app
Jul 15, 2022
Merged

Fix budgets seeds on non development apps#9585
ahukkanen merged 1 commit intodevelopfrom
fix/budgets-seeds-non-development-app

Conversation

@andreslucena
Copy link
Copy Markdown
Member

🎩 What? Why?

There's a problem on the budgets seeds, where if you have an instance without the random workflow enabled, it'll create a component that uses it, and you'll have an exception when visiting the component public page.

I caught this one in our exception tracking system from Try/Nightly.

It's important to note that this doesn't happen on the development_app as the random workflow is enabled there.

The relevant stacktrace:

NoMethodError (undefined method `new' for nil:NilClass):
  
decidim-budgets (0.27.0.rc1) app/controllers/decidim/budgets/application_controller.rb:14:in `current_workflow'
decidim-budgets (0.27.0.rc1) app/controllers/decidim/budgets/budgets_controller.rb:8:in `index'

Testing

  1. Using an external app, for instance I used https://github.com/decidim/metadecidim
  2. Change the Gemfile to point to the repository:
diff --git a/Gemfile b/Gemfile
index 5961b4a..e02da63 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,7 +5,8 @@ source "https://rubygems.org"
 ruby RUBY_VERSION
 
 #DECIDIM_VERSION = { github: "decidim/decidim", branch: "release/0.26-stable" }
-DECIDIM_VERSION = "0.27.0.rc1"
+#DECIDIM_VERSION = "0.27.0.rc1"
+DECIDIM_VERSION = {path: "/home/user/path/to/your/decidim/decidim"}
 
 gem "decidim", DECIDIM_VERSION
 gem "decidim-initiatives", DECIDIM_VERSION
  1. Run bundle install && bin/rails decidim:upgrade
  2. Run the seeds in a clean database: bin/rails db:drop db:create db:migrate && bin/rails db:seed
  3. Visit multiple budgets component public pages inside different participatory spaces
  4. See that you don't have 500 errors anymore

♥️ Thank you!

@andreslucena andreslucena added type: bug module: budgets type: fix PRs that implement a fix for a bug and removed type: bug labels Jul 15, 2022
@ahukkanen ahukkanen merged commit ea43e9c into develop Jul 15, 2022
@ahukkanen ahukkanen deleted the fix/budgets-seeds-non-development-app branch July 15, 2022 12:26
entantoencuanto added a commit that referenced this pull request Jul 15, 2022
…ging

* feature/redesign-main-footer:
  Reorder elements in main links of footer and define links and texts
  Define a cell for static_pages and topics configured to appear in footer
  Fix translation call
  Set fixed links in redesigned_main_legal partial
  Add FooterMenuPresenter to display menu items in footer
  Fix budgets seeds on non development apps (#9585)
  Return 404 when there isn't a valid component in program (#9576)
  Add missing queue close_meeting_reminder to sidekiq configuration (#9568)
  Make the HERE Map display in the currently selected language (#9552)
  Add help text for proposals' 'publish answers immediately' setting  (#9549)
  Fix admin language selector with more than 4 locales (#9519)
  Fix publish event on official proposals (#9421)
  Prevent missing ActionLog entries to break the application (#9502)
  Add boilerplate structure to CHANGELOG (#9501)
  Add step-by-step instructions of the Crowdin releases process (#9555)
  Fix translated attributes field type change (#9547)
  Add `modifyList` option to the autocomplete element (#9548)
  Admin log filters (#9460)
  Improve the default gitignore files created by the generators (#9507)
eliegaboriau pushed a commit to eliegaboriau/decidim that referenced this pull request Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: budgets type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants