From 3f0a7b1dcd1d224dbd23b05567d63b0bc7c9e006 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 14 Apr 2014 21:53:58 -0300 Subject: [PATCH] added logging to run the repr() calls --- luncho/blueprints/voting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/luncho/blueprints/voting.py b/luncho/blueprints/voting.py index f372800..7528d91 100644 --- a/luncho/blueprints/voting.py +++ b/luncho/blueprints/voting.py @@ -150,10 +150,14 @@ def cast_vote(group_id): # finally, cast the vote vote = Vote(request.user, group_id) + LOG.debug('User {user} casted vote {vote}'.format(user=request.user, + vote=vote)) db.session.add(vote) db.session.commit() # so vote gets an id for (pos, place_id) in enumerate(request.as_json.get('choices')): place = CastedVote(vote, pos, place_id) + LOG.debug('\tVoted {place} in {pos} position'.format(place=place, + pos=pos)) db.session.add(place) db.session.commit()