Skip to content

Commit

Permalink
AIRAVATA-3319 Default username_initialized to true for existing user …
Browse files Browse the repository at this point in the history
…profiles
  • Loading branch information
machristie committed Jan 18, 2022
1 parent da7b121 commit 068ea53
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions django_airavata/apps/auth/migrations/0013_auto_20220118_1650.py
@@ -0,0 +1,20 @@
# Generated by Django 3.2.10 on 2022-01-18 16:50

from django.db import migrations


def default_username_initialized(apps, schema_editor):
UserProfile = apps.get_model("django_airavata_auth", "UserProfile")
# Update all existing user's user_profiles to have username_initialized=True
UserProfile.objects.all().update(username_initialized=True)


class Migration(migrations.Migration):

dependencies = [
('django_airavata_auth', '0012_merge_20211210_2041'),
]

operations = [
migrations.RunPython(default_username_initialized, migrations.RunPython.noop)
]

0 comments on commit 068ea53

Please sign in to comment.