mirror of
https://github.com/discourse/discourse.git
synced 2025-04-16 20:59:06 +08:00
DEV: Instance#replace_flags block should be optional
This commit is contained in:
parent
48b4ed41f5
commit
6b4cebed3e
@ -151,7 +151,7 @@ class Plugin::Instance
|
|||||||
def replace_flags(settings: ::FlagSettings.new, score_type_names: [])
|
def replace_flags(settings: ::FlagSettings.new, score_type_names: [])
|
||||||
next_flag_id = ReviewableScore.types.values.max + 1
|
next_flag_id = ReviewableScore.types.values.max + 1
|
||||||
|
|
||||||
yield(settings, next_flag_id)
|
yield(settings, next_flag_id) if block_given?
|
||||||
|
|
||||||
reloadable_patch do |plugin|
|
reloadable_patch do |plugin|
|
||||||
::PostActionType.replace_flag_settings(settings)
|
::PostActionType.replace_flag_settings(settings)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user