Skip to content

Commit 5c596b2

Browse files
committed
Find or create demo categories for joatu demo data
1 parent b847c3b commit 5c596b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/builders/better_together/joatu_demo_builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def build_agreements(requests:, offers:) # rubocop:todo Metrics/AbcSize, Metrics
257257
# -- Helpers --
258258

259259
def find_category(name)
260-
::BetterTogether::Joatu::Category.i18n.find_by(name: name)
260+
::BetterTogether::Joatu::Category.i18n.find_or_create_by(name: name)
261261
end
262262

263263
def identifier_for(name)

0 commit comments

Comments
 (0)