diff --git a/nummi/main/migrations/0012_alter_snapshot_date.py b/nummi/main/migrations/0012_alter_snapshot_date.py new file mode 100644 index 0000000..7322580 --- /dev/null +++ b/nummi/main/migrations/0012_alter_snapshot_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.1.4 on 2022-12-29 18:22 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("main", "0011_alter_category_user_alter_invoice_user_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="snapshot", + name="date", + field=models.DateField(default=datetime.date.today, verbose_name="Date"), + ), + ] diff --git a/nummi/main/models.py b/nummi/main/models.py index cf392f2..f9d25f7 100644 --- a/nummi/main/models.py +++ b/nummi/main/models.py @@ -189,7 +189,7 @@ def snapshot_path(instance, filename): class Snapshot(UserModel): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) - date = models.DateField(default=date.today, unique=True, verbose_name=_("Date")) + date = models.DateField(default=date.today, verbose_name=_("Date")) value = models.DecimalField( max_digits=12, decimal_places=2, default=0, verbose_name=_("Value") )