diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-11-05 12:05:25 +0100 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-11-05 12:11:59 +0100 |
commit | 046bee34d3b19c046dba59c1d6cb08548f978859 (patch) | |
tree | 98acda7cdf40846af1c17182706cd2507b561fce /lib | |
parent | 8a1a7191fd9348fb35fc1aa322dd90869c7dfceb (diff) | |
download | pleroma-046bee34d3b19c046dba59c1d6cb08548f978859.tar.gz |
Fix bug when no posts are in the db.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/activity_pub.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 71e52cb46..d4eb50323 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -157,7 +157,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do # Only search through last 100_000 activities by default defp restrict_recent(query, _) do - since = Repo.aggregate(Activity, :max, :id) - 100_000 + since = (Repo.aggregate(Activity, :max, :id) || 0) - 100_000 from activity in query, where: activity.id > ^since |