8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-23 11:53:12 +00:00

Fix : default value should be 0

This commit is contained in:
Gabriel Detraz 2020-11-02 23:43:54 +01:00
parent b56fc6baf2
commit 3091dca729
2 changed files with 40 additions and 8 deletions

View file

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-11-02 22:42
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cotisations', '0049_auto_20201102_2305'),
]
operations = [
migrations.AlterField(
model_name='article',
name='duration_connection',
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in months)'),
preserve_default=False,
),
migrations.AlterField(
model_name='article',
name='duration_days_connection',
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the connection (in days, will be added to duration in months)'),
preserve_default=False,
),
migrations.AlterField(
model_name='article',
name='duration_days_membership',
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in days, will be added to duration in months)'),
preserve_default=False,
),
migrations.AlterField(
model_name='article',
name='duration_membership',
field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='duration of the membership (in months)'),
preserve_default=False,
),
]

View file

@ -704,26 +704,18 @@ class Article(RevMixin, AclMixin, models.Model):
)
duration_membership = models.PositiveIntegerField(
blank=True,
null=True,
validators=[MinValueValidator(0)],
verbose_name=_("duration of the membership (in months)")
)
duration_days_membership = models.PositiveIntegerField(
blank=True,
null=True,
validators=[MinValueValidator(0)],
verbose_name=_("duration of the membership (in days, will be added to duration in months)"),
)
duration_connection = models.PositiveIntegerField(
blank=True,
null=True,
validators=[MinValueValidator(0)],
verbose_name=_("duration of the connection (in months)")
)
duration_days_connection = models.PositiveIntegerField(
blank=True,
null=True,
validators=[MinValueValidator(0)],
verbose_name=_("duration of the connection (in days, will be added to duration in months)"),
)