~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to online_users_middleware.py

  • Committer: franku
  • Date: 2018-05-03 20:52:11 UTC
  • mfrom: (492.1.2 fix_models)
  • Revision ID: somal@arcor.de-20180503205211-dunvwd5hnvkv8045
fixed UnorderedObjectListWarning; fixed a server error when accessing modul index in documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        online_now_ids = [int(k.replace('online-', '')) for k in fresh]
38
38
 
39
39
        # If the user is authenticated, add their id to the list
40
 
        if request.user.is_authenticated():
 
40
        if request.user.is_authenticated:
41
41
            uid = request.user.id
42
42
            # If their uid is already in the list, we want to bump it
43
43
            # to the top, so we remove the earlier entry.