diff --git a/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py b/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py new file mode 100644 index 0000000..a1a64ac --- /dev/null +++ b/nummi/main/migrations/0009_alter_invoice_file_alter_invoice_transaction_and_more.py @@ -0,0 +1,47 @@ +# Generated by Django 4.1.4 on 2022-12-28 11:20 + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import main.models + + +class Migration(migrations.Migration): + + dependencies = [ + ("main", "0008_auto_20221221_1657"), + ] + + operations = [ + migrations.AlterField( + model_name="invoice", + name="file", + field=models.FileField( + max_length=128, + upload_to=main.models.invoice_path, + validators=[django.core.validators.FileExtensionValidator(["pdf"])], + verbose_name="Fichier", + ), + ), + migrations.AlterField( + model_name="invoice", + name="transaction", + field=models.ForeignKey( + editable=False, + on_delete=django.db.models.deletion.CASCADE, + to="main.transaction", + ), + ), + migrations.AlterField( + model_name="snapshot", + name="file", + field=models.FileField( + blank=True, + default="", + max_length=256, + upload_to=main.models.snapshot_path, + validators=[django.core.validators.FileExtensionValidator(["pdf"])], + verbose_name="Fichier", + ), + ), + ] diff --git a/nummi/main/models.py b/nummi/main/models.py index b293099..58a88a5 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -196,6 +196,7 @@ class Snapshot(models.Model): verbose_name=_("File"), max_length=256, blank=True, + default="", ) def __str__(self):