forked from mirrors/bookwyrm
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):
|
||||
""" 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):
|
||||
""" go from zero to a timeline """
|
||||
|
|
Loading…
Reference in a new issue