Skip to content

Commit 48f18cf

Browse files
authored
Merge pull request #173 from MahjongRepository/ng-mainline
sync with prod
2 parents 5b7db71 + ab35e3c commit 48f18cf

File tree

80 files changed

+2169
-755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2169
-755
lines changed

server/account/views.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ def account_settings(request):
6767
if log_url is not None:
6868
error_code, log_hash = get_replay_hash(log_url)
6969
if error_code is None and log_hash is not None:
70-
stat = TenhouAggregatedStatistics.objects.get(
71-
game_players=TenhouAggregatedStatistics.FOUR_PLAYERS, tenhou_object=current_tenhou
72-
)
70+
try:
71+
stat = TenhouAggregatedStatistics.objects.get(
72+
game_players=TenhouAggregatedStatistics.FOUR_PLAYERS, tenhou_object=current_tenhou
73+
)
74+
except TenhouAggregatedStatistics.DoesNotExist:
75+
stat = None
7376
if stat is not None:
7477
new_rating = PlayerHelper.calculate_rating(
7578
log_hash, current_tenhou_nickname, stat.played_games
4.35 KB
Binary file not shown.

0 commit comments

Comments
 (0)