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

iplweb / bpp / 7d423bde-8caf-4c8b-8bf5-12ad3f831949

22 Aug 2025 01:06PM UTC coverage: 45.781% (+0.06%) from 45.719%
7d423bde-8caf-4c8b-8bf5-12ad3f831949

push

circleci

mpasternak
Merge branch 'release/v202508.1201'

11 of 18 new or added lines in 3 files covered. (61.11%)

1245 existing lines in 104 files now uncovered.

17481 of 38184 relevant lines covered (45.78%)

1.18 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
2✔
UNCOV
2
from messages_extends.models import Message
2✔
3

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

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

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