fix: Allow all notifications to be marked as read
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
202dfe46c2
commit
3eb7dbe984
@ -451,7 +451,10 @@ def my_profile(request):
|
|||||||
action = request.POST.get("action")
|
action = request.POST.get("action")
|
||||||
if action == "notification_mark_read":
|
if action == "notification_mark_read":
|
||||||
notification_id = request.POST.get("notification_id")
|
notification_id = request.POST.get("notification_id")
|
||||||
notification = CommentNotification.objects.get(pk=notification_id)
|
try:
|
||||||
|
notification = CommentNotification.objects.get(pk=notification_id)
|
||||||
|
except CommentNotification.DoesNotExist:
|
||||||
|
notification = BaseNotification.objects.get(pk=notification_id)
|
||||||
notification.read = True
|
notification.read = True
|
||||||
notification.save()
|
notification.save()
|
||||||
elif action == "notification_mark_all_read":
|
elif action == "notification_mark_all_read":
|
||||||
|
Loading…
Reference in New Issue
Block a user