Skip to content

Commit

Permalink
fix: cds expired API
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Dec 12, 2024
1 parent 4d6bea7 commit 41a05ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cds/api/v1/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ def getExpiredCds(yearfrom=None, coursetypes=None):
aa_reg_did__lt=settings.CURRENT_YEAR,
)
.exclude(stato_regdid_cod="R")
.select_related("cds")
# exclude courses that have finished their regular life cycle
.exclude(aa_reg_did__lte=(settings.CURRENT_YEAR - F("cds__durata_anni")))
.values("aa_reg_did", "cds__cds_cod", "cds__durata_anni")
)

Expand Down

0 comments on commit 41a05ed

Please sign in to comment.