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

iplweb / bpp / 7cc51f57-696c-4e24-b7c6-e519e63d08ef

20 Aug 2025 07:40PM UTC coverage: 43.324% (+3.6%) from 39.761%
7cc51f57-696c-4e24-b7c6-e519e63d08ef

push

circleci

mpasternak
Merge branch 'release/v202508.1191'

5 of 5 new or added lines in 2 files covered. (100.0%)

1828 existing lines in 117 files now uncovered.

16520 of 38131 relevant lines covered (43.32%)

0.78 hits per line

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

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

UNCOV
4
class NotificationsMiddleware(MiddlewareMixin):
1✔
UNCOV
5
    def process_request(self, request):
1✔
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
UNCOV
11
        try:
1✔
UNCOV
12
            user_id = request.user.pk
1✔
13
        except AttributeError:
×
14
            return
×
15

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

UNCOV
19
        url = request.get_full_path()
1✔
UNCOV
20
        Message.objects.filter(user_id=user_id, read=False, message__icontains=url).update(read=True)
1✔
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