FIX: Stop register_topic_list_preload_user_ids from breaking old versions (#160)
We need a proper fix, but this stops the bleeding for now. Wrapped code related to `register_topic_list_preload_user_ids` in a `respond_to?(:register_topic_list_preload_user_ids)` block because this API is not available in beta or stable versions of Discourse.
This commit is contained in:
parent
6b6d5978a2
commit
cf368c19cb
|
@ -695,6 +695,7 @@ SQL
|
||||||
.count
|
.count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if respond_to?(:register_topic_list_preload_user_ids)
|
||||||
class ::Topic
|
class ::Topic
|
||||||
attr_accessor :accepted_answer_user_id
|
attr_accessor :accepted_answer_user_id
|
||||||
end
|
end
|
||||||
|
@ -744,4 +745,5 @@ SQL
|
||||||
|
|
||||||
prepend AddSolvedToTopicPostersSummary
|
prepend AddSolvedToTopicPostersSummary
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue