Changes between Version 2 and Version 3 of Ticket #30431


Ignore:
Timestamp:
May 2, 2019, 6:35:12 AM (5 years ago)
Author:
mandm
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30431 – Description

    v2 v3  
    3333def gen_uuid(apps, schema_editor):
    3434    UserModel = apps.get_model('myapp', 'customuser')
    35     for row in UserModel.objects.all():     # .objects.using('foobar').all(): -- HANGS !
     35    for row in UserModel.objects.all():     # .objects.using('nondefault').all(): -- HANGS !
    3636        row.uniq_id = uuid.uuid4()
    37         row.save(update_fields=['uniq_id']) # .save(using='foobar', ...)      -- HANGS with database routers !
     37        row.save(update_fields=['uniq_id'])
    3838
    3939class Migration(migrations.Migration):
Back to Top