Skip to content

Commit

Permalink
Merge pull request dj-stripe#547 from W7PEA/issue-497
Browse files Browse the repository at this point in the history
Recommended fix for Issue dj-stripe#497
  • Loading branch information
kavdev authored Jul 18, 2017
2 parents 4c4ba92 + 47c9687 commit 1fa5aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djstripe/management/commands/djstripe_init_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Command(BaseCommand):

def handle(self, *args, **options):
"""Create Customer objects for Subscribers without Customer objects associated."""
for subscriber in get_subscriber_model().objects.filter(customer__isnull=True):
for subscriber in get_subscriber_model().objects.filter(djstripe_customers=None):
# use get_or_create in case of race conditions on large subscriber bases
Customer.get_or_create(subscriber=subscriber)
print("Created subscriber for {0}".format(subscriber.email))

0 comments on commit 1fa5aca

Please sign in to comment.