Skip to content

Commit

Permalink
fix(clans): order by created date in 10 day report statistic
Browse files Browse the repository at this point in the history
  • Loading branch information
Hojagulyyev committed Dec 7, 2023
1 parent 9eec33e commit dd6291b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __str__(self):
def get_xp_daily_report(self):
return [
diary.get_earned_xp()
for diary in self.diaries.all()[:10]
for diary in self.diaries.order_by("-created_date")[:10]
]

def get_full_name(self):
Expand Down
10 changes: 5 additions & 5 deletions templates/clans/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,22 +360,22 @@ <h2 class="section-title">Overview</h2>
label: "Diary's XP",
data: datasetData{{ forloop.counter }},
fill: false,
lineTension: 0,
borderWidth: 4,
lineTension: .35,
borderWidth: 1.5,
borderColor: "{{ forloop.counter|get_statistic_color_by_color_index }}",
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0,
borderJoinStyle: 'bevel',
pointBorderColor: "{{ forloop.counter|get_statistic_color_by_color_index }}",
pointBackgroundColor: "#1d2333",
pointBorderWidth: 4,
pointBorderWidth: 2,
pointHoverRadius: 5,
pointHoverBackgroundColor: "#1d2333",
pointHoverBorderColor: "{{ forloop.counter|get_statistic_color_by_color_index }}",
pointHoverBorderWidth: 4,
pointRadius: 5,
pointHitRadius: 10
pointRadius: 2,
pointHitRadius: 40
},
{% endfor %}
]
Expand Down

0 comments on commit dd6291b

Please sign in to comment.