Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
580 B
2
Indexable
Never
from django.db import migrations, models


def set_default_transaction_processor(apps, schema_editor):
    Venue = apps.get_model('venue', 'Venue')
    Venue.objects.filter(transaction_processor='VENUE_TRANSACTION_PROCESSOR_BRAINTREE').update(transaction_processor='VENUE_TRANSACTION_PROCESSOR_STRIPE')


class Migration(migrations.Migration):

    dependencies = [
        ('venue', '000x_previous_migration'),  # Replace '000x_previous_migration' with the previous migration number
    ]

    operations = [
        migrations.RunPython(set_default_transaction_processor),
    ]