Changed PlayerDanScore to only list non-legacy hanchans

This commit is contained in:
2017-11-20 07:47:47 +01:00
parent 36272c60d6
commit 5ad628f33a
2 changed files with 3 additions and 1 deletions

View File

@@ -510,6 +510,7 @@ class KyuDanRanking(models.Model):
)
self.save(force_update=True)
def update_hanchan_points(self, hanchan):
"""
Berechne die Kyu bzw. Dan Punkte für eine Hanchan neu.

View File

@@ -223,7 +223,8 @@ class PlayerDanScore(PlayerScore):
template_name = 'mahjong_ranking/player_dan_score.html'
def get_queryset(self):
return models.Hanchan.objects.dan_hanchans(user=self.user)
kyu_dan_ranking = models.KyuDanRanking.objects.get(user=self.user)
return models.Hanchan.objects.dan_hanchans(user=self.user, since=kyu_dan_ranking.legacy_date)
class PlayerInvalidScore(PlayerScore):