Skip to content

Commit

Permalink
populate_db: Rename confusing sub local variable.
Browse files Browse the repository at this point in the history
While the code was technically correct, elsewhere in that function sub
a Subscription object, not a tuple of ints.
  • Loading branch information
timabbott committed Feb 4, 2016
1 parent 37e987e commit c55ac01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zilencer/management/commands/populate_db.py
Expand Up @@ -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():
Expand Down

0 comments on commit c55ac01

Please sign in to comment.