mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 13:01:08 +00:00
Merge pull request #861 from mouse-reeve/unread-count-error
Safely return unread count when key is unset
This commit is contained in:
commit
e51a287cd3
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