From 65dedc07d8b24e039ce47de393c78be3822e0d6e Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sat, 28 Oct 2017 05:08:09 +0200 Subject: [PATCH] Fix bug migration --- cotisations/migrations/0026_auto_20171028_0126.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cotisations/migrations/0026_auto_20171028_0126.py b/cotisations/migrations/0026_auto_20171028_0126.py index cf992ae1..436e0574 100644 --- a/cotisations/migrations/0026_auto_20171028_0126.py +++ b/cotisations/migrations/0026_auto_20171028_0126.py @@ -10,7 +10,7 @@ def create_type(apps, schema_editor): Vente = apps.get_model('cotisations', 'Vente') Article = apps.get_model('cotisations', 'Article') db_alias = schema_editor.connection.alias - articles = Articles.objects.using(db_alias).all() + articles = Article.objects.using(db_alias).all() ventes = Vente.objects.using(db_alias).all() cotisations = Cotisation.objects.using(db_alias).all() for article in articles: @@ -54,7 +54,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='article', name='type_cotisation', - field=models.CharField(choices=[('Connexion', 'Connexion'), ('Adhesion', 'Adhesion'), ('All', 'All')], default=None, max_length=255, null=True), + field=models.CharField(blank=True, choices=[('Connexion', 'Connexion'), ('Adhesion', 'Adhesion'), ('All', 'All')], default=None, max_length=255, null=True), ), migrations.AddField( model_name='cotisation',