diff --git a/bookwyrm/suggested_users.py b/bookwyrm/suggested_users.py index a6d09ecd..7b20461a 100644 --- a/bookwyrm/suggested_users.py +++ b/bookwyrm/suggested_users.py @@ -66,6 +66,8 @@ class SuggestedUsers(RedisStore): def rerank_user_suggestions(self, user): """update the ranks of the follows suggested to a user""" + if not user.local: + raise ValueError('Attempting to create suggestions for remote user: ', user.id) self.populate_store(self.store_id(user)) def get_suggestions(self, user): diff --git a/bookwyrm/templates/feed/feed.html b/bookwyrm/templates/feed/feed.html index 21e71ae1..78b03436 100644 --- a/bookwyrm/templates/feed/feed.html +++ b/bookwyrm/templates/feed/feed.html @@ -44,18 +44,22 @@ {# activity feed #} {% if not activities %} -
{% trans "There aren't any activities right now! Try following a user to get started" %}
+{% trans "There aren't any activities right now! Try following a user to get started" %}
+ + {% if suggested_users %} + {# suggested users for when things are very lonely #} + {% include 'feed/suggested_users.html' with suggested_users=suggested_users %} +- {% blocktrans with mutuals=user.mutuals|intcomma count counter=user.mutuals %}{{ mutuals }} follower you follow{% plural %}{{ mutuals }} followers you follow{% endblocktrans %} -
- {% elif user.shared_books %} -{% blocktrans with shared_books=user.shared_books|intcomma count counter=user.shared_books %}{{ shared_books }} book on your shelves{% plural %}{{ shared_books }} books on your shelves{% endblocktrans %}
- {% endif %} -+ {% blocktrans with mutuals=user.mutuals|intcomma count counter=user.mutuals %}{{ mutuals }} follower you follow{% plural %}{{ mutuals }} followers you follow{% endblocktrans %} +
+ {% elif user.shared_books %} +{% blocktrans with shared_books=user.shared_books|intcomma count counter=user.shared_books %}{{ shared_books }} book on your shelves{% plural %}{{ shared_books }} books on your shelves{% endblocktrans %}
+ {% endif %} +