mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-13 08:12:51 +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"])
|
@require_http_methods(["GET"])
|
||||||
def latest_transactions(request):
|
def latest_transactions(request):
|
||||||
limit = timezone.now() - relativedelta(days=3)
|
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(
|
return render(
|
||||||
request,
|
request,
|
||||||
|
|||||||
Reference in New Issue
Block a user