mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
remove unecessary '.limit(1)'
This commit is contained in:
@ -426,7 +426,7 @@ class ApplicationController < ActionController::Base
|
||||
json = ApplicationController.banner_json_cache["json"]
|
||||
|
||||
unless json
|
||||
topic = Topic.where(archetype: Archetype.banner).limit(1).first
|
||||
topic = Topic.where(archetype: Archetype.banner).first
|
||||
banner = topic.present? ? topic.banner : {}
|
||||
ApplicationController.banner_json_cache["json"] = json = MultiJson.dump(banner)
|
||||
end
|
||||
|
Reference in New Issue
Block a user