mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Safely return unread count when key is unset
This commit is contained in:
parent
99185bbb3a
commit
8faec714bb
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ class ActivityStream(ABC):
|
||||||
|
|
||||||
def get_unread_count(self, user):
|
def get_unread_count(self, user):
|
||||||
""" get the unread status count for this user's feed """
|
""" get the unread status count for this user's feed """
|
||||||
return int(r.get(self.unread_id(user)))
|
return int(r.get(self.unread_id(user)) or 0)
|
||||||
|
|
||||||
def populate_stream(self, user):
|
def populate_stream(self, user):
|
||||||
""" go from zero to a timeline """
|
""" go from zero to a timeline """
|
||||||
|
|
Loading…
Reference in a new issue