From 3014b9ac2ed2ac97ddc6991ddbcdfa3faeb12118 Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Mon, 28 Dec 2020 16:37:43 +0100 Subject: [PATCH] Remove useless MinValueValidator(0) on PositiveIntegerField. --- .../migrations/0051_auto_20201228_1636.py | 45 +++++++++++++++++++ cotisations/models.py | 6 --- 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 cotisations/migrations/0051_auto_20201228_1636.py diff --git a/cotisations/migrations/0051_auto_20201228_1636.py b/cotisations/migrations/0051_auto_20201228_1636.py new file mode 100644 index 00000000..031ccf63 --- /dev/null +++ b/cotisations/migrations/0051_auto_20201228_1636.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2020-12-28 15:36 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cotisations', '0050_auto_20201102_2342'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='duration_connection', + field=models.PositiveIntegerField(verbose_name='duration of the connection (in months)'), + ), + migrations.AlterField( + model_name='article', + name='duration_days_connection', + field=models.PositiveIntegerField(verbose_name='duration of the connection (in days, will be added to duration in months)'), + ), + migrations.AlterField( + model_name='article', + name='duration_days_membership', + field=models.PositiveIntegerField(verbose_name='duration of the membership (in days, will be added to duration in months)'), + ), + migrations.AlterField( + model_name='article', + name='duration_membership', + field=models.PositiveIntegerField(verbose_name='duration of the membership (in months)'), + ), + migrations.AlterField( + model_name='vente', + name='duration_days_connection', + field=models.PositiveIntegerField(default=0, verbose_name='duration of the connection (in days, will be added to duration in months)'), + ), + migrations.AlterField( + model_name='vente', + name='duration_days_membership', + field=models.PositiveIntegerField(default=0, verbose_name='duration of the membership (in days, will be added to duration in months)'), + ), + ] diff --git a/cotisations/models.py b/cotisations/models.py index b3480561..328a2657 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -467,7 +467,6 @@ class Vente(RevMixin, AclMixin, models.Model): ) duration_days_connection = models.PositiveIntegerField( default=0, - validators=[MinValueValidator(0)], verbose_name=_("duration of the connection (in days, will be added to duration in months)"), ) duration_membership = models.PositiveIntegerField( @@ -475,7 +474,6 @@ class Vente(RevMixin, AclMixin, models.Model): ) duration_days_membership = models.PositiveIntegerField( default=0, - validators=[MinValueValidator(0)], verbose_name=_("duration of the membership (in days, will be added to duration in months)"), ) @@ -704,19 +702,15 @@ class Article(RevMixin, AclMixin, models.Model): ) duration_membership = models.PositiveIntegerField( - validators=[MinValueValidator(0)], verbose_name=_("duration of the membership (in months)") ) duration_days_membership = models.PositiveIntegerField( - validators=[MinValueValidator(0)], verbose_name=_("duration of the membership (in days, will be added to duration in months)"), ) duration_connection = models.PositiveIntegerField( - validators=[MinValueValidator(0)], verbose_name=_("duration of the connection (in months)") ) duration_days_connection = models.PositiveIntegerField( - validators=[MinValueValidator(0)], verbose_name=_("duration of the connection (in days, will be added to duration in months)"), )