diff --git a/core/models.py b/core/models.py index ea31af0..4bea972 100644 --- a/core/models.py +++ b/core/models.py @@ -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. """