Skip to content

Commit

Permalink
Corrige une utilisation de period.start.period
Browse files Browse the repository at this point in the history
  • Loading branch information
frtomas committed Jul 11, 2023
1 parent ee0342d commit 72abdef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openfisca_france_local/departements/eure_et_loir/adefip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
from openfisca_core.periods import Period

from openfisca_france.model.base import *

from numpy import logical_not as not_
Expand Down Expand Up @@ -55,7 +57,7 @@ class adefip_eligibilite(Variable):
definition_period = MONTH

def formula(individu, period):
annee_glissante = period.start.period('year').offset(-1)
annee_glissante = Period(('year', period.start, 1)).offset(-1).offset(-1, 'month')

# conditions de domiciliation
residence_eure_loire = individu.menage('eure_loire_eligibilite_residence', period)
Expand Down

0 comments on commit 72abdef

Please sign in to comment.