From f3bb2049e33dddbd470ea2207afd4df94458636c Mon Sep 17 00:00:00 2001 From: Hojagulyyev Date: Thu, 7 Dec 2023 20:39:12 +0500 Subject: [PATCH] fix(clans): order by desc created date, 10 day report statistic order by asc --- apps/accounts/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/accounts/models.py b/apps/accounts/models.py index 4898b3d..4cc58ed 100644 --- a/apps/accounts/models.py +++ b/apps/accounts/models.py @@ -20,8 +20,8 @@ def __str__(self): def get_xp_daily_report(self): return [ diary.get_earned_xp() - for diary in self.diaries.order_by("created_date")[:10] - ] + for diary in self.diaries.order_by("-created_date")[:10] + ][::-1] def get_full_name(self): return f"{self.user.first_name} {self.user.last_name}"