<commit_before>from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect, HttpResponse
from core.models import UserNotification


@login_required
def base(request, notification_id):
    """URL that marks the notification read then redirects"""
    notification = UserNotification.objects.get(pk=notification_id)
    if notification.user.pk is not request.user.pk:
        response = HttpResponse(403)
    else:
        response = HttpResponseRedirect(notification.redirect_url)
        notification.read = True
        notification.save()
    return response<commit_msg>Fix bad notificaiton status<commit_after>from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect, HttpResponse
from core.models import UserNotification


@login_required
def base(request, notification_id):
    """URL that marks the notification read then redirects"""
    notification = UserNotification.objects.get(pk=notification_id)
    if notification.user.pk is not request.user.pk:
        response = HttpResponse(status=403)
    else:
        response = HttpResponseRedirect(notification.redirect_url)
        notification.read = True
        notification.save()
    return response
{'fraction_non_alphanumeric': 0.07114308553157474, 'fraction_numerical': 0.004796163069544364, 'mean_word_length': 4.443478260869565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3714821', 'n_tokens_mistral': 309, 'n_tokens_neox': 302, 'n_words': 86}