6048
[auf_rh_dae.git] / project / dae / templatetags / dae.py
index e2ea834..0e50e5e 100644 (file)
@@ -141,13 +141,12 @@ def rh_remun_form_for_year(context, dossier, year=None):
         model=rh.Remuneration,
         )
 
-    def _get_qs(inst, year=year):
+    year = year or (
+        dossier.date_fin.year if
+        dossier.date_fin else
+        datetime.date.today().year)
 
-        if year == None:
-            year = (
-                inst.instance.date_fin.year if
-                inst.instance.date_fin else
-                datetime.date.today().year)
+    def _get_qs(inst, year=year):
 
         year_start = datetime.date(year, 1, 1)
         year_end = datetime.date(year, 12, 31)