Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
Revert debugging statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kelly committed Jan 7, 2015
1 parent a6f2249 commit 5a0a6c2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions affiliates/links/management/commands/update_leaderboard.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.contrib.auth.models import User
from django.db import IntegrityError
from django.db.models import Sum

from affiliates.base.management.commands import QuietCommand
Expand Down Expand Up @@ -40,12 +39,5 @@ def handle_quiet(self, *args, **kwargs):
value=entry[1])
for index, entry in enumerate(total_clicks)
]
try:
LeaderboardStanding.objects.bulk_create(new_standings, batch_size=1000)
except IntegrityError:
msg = ''
for standing in new_standings:
msg += '{0}: {1} {2}\n'.format(standing.ranking, standing.user_id, standing.value)
raise Exception(msg)

LeaderboardStanding.objects.bulk_create(new_standings, batch_size=1000)
self.output('Done!')

0 comments on commit 5a0a6c2

Please sign in to comment.