mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
BUGFIX: flag topic broke all liking on the sites
This commit is contained in:
@ -65,7 +65,10 @@ class PostActionsController < ApplicationController
|
||||
def fetch_post_from_params
|
||||
params.require(:id)
|
||||
|
||||
post_id = if params[:flag_topic]
|
||||
flag_topic = params[:flag_topic]
|
||||
flag_topic = flag_topic && (flag_topic == true || flag_topic == "true")
|
||||
|
||||
post_id = if flag_topic
|
||||
begin
|
||||
Topic.find(params[:id]).posts.first.id
|
||||
rescue
|
||||
|
Reference in New Issue
Block a user