def copy_username(apps, schema_editor):
    """
    Copies the exercise name to the original name field
    """
    Ingredient = apps.get_model('nutrition', 'Ingredient')
    for ingredient in Ingredient.objects.all():
        if ingredient.user:
            ingredient.license_author = ingredient.user.username
        else:
            ingredient.license_author = 'wger.de'
        ingredient.save()
