You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
501 B

# Generated by Django 2.1.5 on 2019-01-12 19:50
from django.db import migrations
def set_badge_key(apps, schema_editor):
Project = apps.get_model("accounts", "Project")
for project in Project.objects.select_related("owner").all():
project.badge_key = project.owner.username
project.save()
class Migration(migrations.Migration):
dependencies = [("accounts", "0019_project_badge_key")]
operations = [migrations.RunPython(set_badge_key, migrations.RunPython.noop)]