mirror of
https://github.com/ae-utbm/sith.git
synced 2025-08-12 03:59:57 +00:00
rename is_validated field
This commit is contained in:
@@ -1378,7 +1378,7 @@ class MonthField(models.CharField):
|
|||||||
if value is None:
|
if value is None:
|
||||||
return value
|
return value
|
||||||
try:
|
try:
|
||||||
year, month = map(int, value.split("-"))
|
year, month = value.split("-")
|
||||||
return date(year, month, 1)
|
return date(year, month, 1)
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
return value
|
return value
|
||||||
@@ -1388,7 +1388,7 @@ class MonthField(models.CharField):
|
|||||||
return value
|
return value
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
try:
|
try:
|
||||||
year, month = map(int, value.split("-"))
|
year, month = value.split("-")
|
||||||
return date(year, month, 1)
|
return date(year, month, 1)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
@@ -1407,7 +1407,7 @@ class MonthField(models.CharField):
|
|||||||
|
|
||||||
|
|
||||||
class InvoiceCall(models.Model):
|
class InvoiceCall(models.Model):
|
||||||
validated = models.BooleanField(verbose_name=_("is validated"))
|
is_validated = models.BooleanField(verbose_name=_("is validated"))
|
||||||
club = models.ForeignKey(Club, on_delete=models.CASCADE)
|
club = models.ForeignKey(Club, on_delete=models.CASCADE)
|
||||||
month = MonthField(verbose_name=_("invoice date"))
|
month = MonthField(verbose_name=_("invoice date"))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user