Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Claus <thorstenclaus@web.de>2021-05-09 11:23:07 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2021-06-13 02:03:22 +0300
commit704223721870bcb9dece55c6073d637cbb41216c (patch)
tree06964f2ebdadb863f8b1a462caf9b257f0ecd243 /app/presenters/node_info_presenter.rb
parentd4331f4e65781a9813f3cd991885115e4a603eef (diff)
Styles, SQL format
Diffstat (limited to 'app/presenters/node_info_presenter.rb')
-rw-r--r--app/presenters/node_info_presenter.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/presenters/node_info_presenter.rb b/app/presenters/node_info_presenter.rb
index 045cd8c65..343981422 100644
--- a/app/presenters/node_info_presenter.rb
+++ b/app/presenters/node_info_presenter.rb
@@ -105,17 +105,17 @@ class NodeInfoPresenter
end
def local_posts
- Rails.cache.fetch("NodeInfoPresenter/local_posts", expires_in: 1.hours) do
+ Rails.cache.fetch("NodeInfoPresenter/local_posts", expires_in: 1.hour) do
@local_posts ||= Post.where(type: "StatusMessage")
- .joins(:author)
- .where("owner_id IS NOT null")
- .count
+ .joins(:author)
+ .where.not(people: {owner_id: nil})
+ .count
end
end
def local_comments
@local_comments ||= Comment.joins(:author)
- .where("owner_id IS NOT null")
+ .where.not(people: {owner_id: nil})
.count
end
end