]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/views.py
Add more debugging statements. Fix "joins" vs "matches" stuff.
[xonotic/xonstat.git] / xonstat / views.py
index a32ac7b8a2d9fb8e0c24949c95436468c9345807..5f53bd70247530110857e23d534a6c8cb985418d 100644 (file)
@@ -244,13 +244,15 @@ def stats_submit(request):
             has_real_players = True
         player = get_or_create_player(session=session, 
                 hashkey=player_events['P'])
-        if 'joins' in player_events:
+        if 'joins' in player_events or 'matches' in player_events:
             pgstat = create_player_game_stat(session=session, 
                     player=player, game=game, player_events=player_events)
     
     if has_real_players:
         session.commit()
+        log.debug('Success! Stats recorded.')
         return {'msg':'Success! Stats recorded.'}
     else:
         session.rollback()
+        log.debug('No real players found. Stats ignored.')
         return {'msg':'No real players found. Stats ignored.'}