Skip to content

Commit

Permalink
fix(clans): order by desc created date, 10 day report statistic order…
Browse files Browse the repository at this point in the history
… by asc
  • Loading branch information
Hojagulyyev committed Dec 7, 2023
1 parent 349c69b commit f3bb204
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit f3bb204

Please sign in to comment.