~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to pybb/unread.py

  • Committer: franku
  • Date: 2018-04-08 14:29:44 UTC
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: somal@arcor.de-20180408142944-rwtfq0r3p3momub8
is_authenticated is a now property

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
 
4
4
def cache_unreads(qs, user):
5
 
    if not len(qs) or not user.is_authenticated():
 
5
    if not len(qs) or not user.is_authenticated:
6
6
        return qs
7
7
    if isinstance(qs[0], Topic):
8
8
        reads = Read.objects.filter(topic__pk__in=set(x.id for x in qs),