From 50b7b31dfb35f91f6f1827bb7b2664563143c68d Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 6 Dec 2011 12:30:06 -0500 Subject: [PATCH] Hotfix for malformed match_ids: remove leading '0.'. Match ids are coming in as 0.1234.5678, which doesn't resolve to a number. This commit identifies such malformed numbers and removes their leading '0.'s. This is an ugly fix, but hopefully someone can address the source of that number for the permanent fix. --- xonstat/views/submission.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 09c0bb6..36a9b1a 100755 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -449,6 +449,10 @@ def parse_body(request): value = unicode(value, 'utf-8') if key in 'V' 'T' 'G' 'M' 'S' 'C' 'R' 'W' 'I': + # FIXME: hotfix for malformed numbers in the match_id + if key == 'I' and value.startswith('0.'): + value = value[2:] + game_meta[key] = value if key == 'P': -- 2.39.2