mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-01 15:03:20 +02:00
fix(insights:latest-transactions): order transactions from newest to oldest
This commit is contained in:
@@ -164,7 +164,9 @@ def category_sum_by_currency(request):
|
||||
@require_http_methods(["GET"])
|
||||
def latest_transactions(request):
|
||||
limit = timezone.now() - relativedelta(days=3)
|
||||
transactions = Transaction.objects.filter(created_at__gte=limit)[:30]
|
||||
transactions = Transaction.objects.filter(created_at__gte=limit).order_by("-id")[
|
||||
:30
|
||||
]
|
||||
|
||||
return render(
|
||||
request,
|
||||
|
||||
Reference in New Issue
Block a user