Coverage for baibu/notifications/context_processors.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-10-06 13:07 +0000

1from .services import unread_count 

2 

3 

4def notifications(request): 

5 user = getattr(request, "user", None) 

6 if user is None or not user.is_authenticated: 

7 return {} 

8 return {"unread_notifications": unread_count(user)}