Permalink
Browse files

populate_db: Rename confusing sub local variable.

While the code was technically correct, elsewhere in that function sub
a Subscription object, not a tuple of ints.
  • Loading branch information...
timabbott committed Jan 27, 2016
1 parent 37e987e commit c55ac01ae69ef1ca8ce8315ec4b179ec3ebb46a6
Showing with 3 additions and 3 deletions.
  1. +3 −3 zilencer/management/commands/populate_db.py
@@ -658,9 +658,9 @@ def fix_email(email):
active=pending_subs[pending_sub])
subscriptions_to_add.append(s)
Subscription.objects.bulk_create(subscriptions_to_add)
- for (sub, active) in subscriptions_to_change:
- current_subs_obj[sub].active = active
- current_subs_obj[sub].save(update_fields=["active"])
+ for (sub_tuple, active) in subscriptions_to_change:
+ current_subs_obj[sub_tuple].active = active
+ current_subs_obj[sub_tuple].save(update_fields=["active"])
subs = {}
for sub in Subscription.objects.all():

0 comments on commit c55ac01

Please sign in to comment.