Skip to content
Snippets Groups Projects
Verified Commit b6c7cb36 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Correctly sort notifications and activities on dashboard by creation time

parent 60507075
No related branches found
No related tags found
1 merge request!785Resolve "Fix notifications on the dashboard"
......@@ -184,9 +184,9 @@ def index(request: HttpRequest) -> HttpResponse:
person = DummyPerson()
widgets = []
activities = person.activities.all()[:5]
notifications = person.notifications.all()[:5]
unread_notifications = person.notifications.all().filter(read=False)
activities = person.activities.all().order_by("-created")[:5]
notifications = person.notifications.all().order_by("-created")[:5]
unread_notifications = person.notifications.all().filter(read=False).order_by("-created")
context["activities"] = activities
context["notifications"] = notifications
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment