Browse Source

Allow reference field to be blank.

opi 8 years ago
parent
commit
4002cb8d36
2 changed files with 2 additions and 2 deletions
  1. 1 1
      coin/offers/migrations/0006_offer_reference.py
  2. 1 1
      coin/offers/models.py

+ 1 - 1
coin/offers/migrations/0006_offer_reference.py

@@ -14,7 +14,7 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='offer',
             name='reference',
-            field=models.CharField(help_text='Information a utiliser par exemple comme identifiant de virement', max_length=255, null=True, verbose_name="identifiant de l'offre"),
+            field=models.CharField(help_text='Information a utiliser par exemple comme identifiant de virement', max_length=255, blank=True, verbose_name="identifiant de l'offre"),
             preserve_default=True,
         ),
     ]

+ 1 - 1
coin/offers/models.py

@@ -20,7 +20,7 @@ class Offer(models.Model):
 
     name = models.CharField(max_length=255, blank=False, null=False,
                             verbose_name="nom de l'offre")
-    reference = models.CharField(max_length=255, blank=False, null=True,
+    reference = models.CharField(max_length=255, blank=True,
                                     verbose_name="Référence de l'offre",
                                     help_text="Identifiant a utiliser par exemple comme identifiant de virement")
     configuration_type = models.CharField(max_length=50,