mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: advanced tutorial errors when all categories are secured (#10111)
The category hashtag step will fail with an error when all categories aren't public. Choose a category that the user can see.
This commit is contained in:
parent
42226e12ee
commit
713298c622
@ -41,7 +41,7 @@ module DiscourseNarrativeBot
|
|||||||
tutorial_recover: {
|
tutorial_recover: {
|
||||||
next_state: :tutorial_category_hashtag,
|
next_state: :tutorial_category_hashtag,
|
||||||
next_instructions: Proc.new do
|
next_instructions: Proc.new do
|
||||||
category = Category.secured.last
|
category = Category.secured(Guardian.new(@user)).last
|
||||||
slug = category.slug
|
slug = category.slug
|
||||||
|
|
||||||
if parent_category = category.parent_category
|
if parent_category = category.parent_category
|
||||||
|
Loading…
Reference in New Issue
Block a user