• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iplweb / bpp / 49150ee2-a89b-4df8-9538-55cb06c06872

24 Aug 2025 11:07PM UTC coverage: 42.715% (+1.5%) from 41.169%
49150ee2-a89b-4df8-9538-55cb06c06872

push

circleci

mpasternak
Merge branch 'release/v202508.1207'

1 of 1 new or added line in 1 file covered. (100.0%)

1119 existing lines in 82 files now uncovered.

16660 of 39003 relevant lines covered (42.71%)

1.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
src/notifications/middleware.py
1
from django.utils.deprecation import MiddlewareMixin
3✔
2
from messages_extends.models import Message
3✔
3

4
class NotificationsMiddleware(MiddlewareMixin):
3✔
5
    def process_request(self, request):
3✔
6
        """After entering a web page, we may want to mark some messages as read
7
        basing on the URL they contain.
8
        """
9

10
        # request.user may be a SimpleLazyObject instance
11
        try:
3✔
12
            user_id = request.user.pk
3✔
13
        except AttributeError:
×
14
            return
×
15

16
        if user_id is None:
3✔
UNCOV
17
            return
1✔
18

19
        url = request.get_full_path()
3✔
20
        Message.objects.filter(user_id=user_id, read=False, message__icontains=url).update(read=True)
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc