8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-25 16:33:47 +00:00

fix: Update deposits initial migration

This commit is contained in:
Jean-Romain Garnier 2021-08-06 16:16:07 +02:00
parent 69128becc7
commit 8ea161291e
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 2.2.18 on 2021-08-06 13:10
# Generated by Django 2.2.18 on 2021-08-06 13:54
from django.conf import settings
from django.db import migrations, models
@ -25,6 +25,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'deposit item',
'verbose_name_plural': 'deposit items',
'abstract': False,
},
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model),
),
@ -34,6 +35,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateTimeField(auto_now_add=True, verbose_name='date')),
('returned', models.BooleanField(default=False, verbose_name='returned')),
('deposit_amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='deposit amount')),
('item', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='deposits.DepositItem')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],

View file

@ -50,7 +50,9 @@ class Deposit(RevMixin, AclMixin, models.Model):
item = models.ForeignKey("DepositItem", on_delete=models.PROTECT)
date = models.DateTimeField(auto_now_add=True, verbose_name=_("date"))
returned = models.BooleanField(default=False, verbose_name=_("returned"))
deposit_amount = models.DecimalField(verbose_name=_("deposit amount"))
deposit_amount = models.DecimalField(
max_digits=5, decimal_places=2, verbose_name=_("deposit amount")
)
class Meta:
abstract = False