Commit dc67a25a authored by Alex Kalderimis's avatar Alex Kalderimis

Use create! in WikiPage::Meta.find_or_create

parent 4ae96373
......@@ -44,7 +44,7 @@ class WikiPage
transaction do
updates = wiki_page_updates(wiki_page)
found = find_by_canonical_slug(known_slugs, project)
meta = found || create(updates.merge(project_id: project.id))
meta = found || create!(updates.merge(project_id: project.id))
meta.update_state(found.nil?, known_slugs, wiki_page, updates)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment