fixes invalid 'is_older' method on EnregistrementRecursif

This commit is contained in:
root
2018-01-01 11:47:23 +01:00
parent 5b07608c15
commit 19ed162e58

View File

@@ -104,8 +104,9 @@ class EnregistrementRecursif(models.Model):
ordering = ('jour',)
def is_older(self, month, year):
return (self.created_date.month <= month
and self.created_date.year <= year)
return (self.created_date.year < year
or (self.created_date.month < month
and self.created_date.year == year))
def spawn(self, month, year, commit=True):
""" Spawn a new Enregistrement for given month and year. """