Skip to content

Commit

Permalink
make migration fast
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Oct 12, 2023
1 parent ff72c0e commit f74e776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app_users/migrations/0007_appuser_is_paying.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@


def set_is_paying_from_stripe_customer_id(apps, schema_editor):
AppUsers = apps.get_model("app_users", "appuser")
AppUsers.objects.filter(stripe_customer_id__isnull=False).update(is_paying=True)
AppUser = apps.get_model("app_users", "appuser")
AppUser.objects.exclude(stripe_customer_id="").update(is_paying=True)


class Migration(migrations.Migration):
Expand Down

0 comments on commit f74e776

Please sign in to comment.