You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AdvisoryV2 latest_per_avid() fallback query is never executed #2339
There appears to be a problem with this logic. I believe the else: block is completely unreachable (dead code).
If an AdvisoryAlias is not found, AdvisoryAlias.objects.get() raises AdvisoryAlias.DoesNotExist, causing execution to jump directly to the except block, which immediately calls continue. As a result, the fallback logic that queries AdvisoryV2 latest_per_avid is never executed.
try:
if alias := AdvisoryAlias.objects.get(alias=raw_alias):
for adv in alias.advisories.all():
advisories.add(adv)
else:
advs = AdvisoryV2.objects.filter(advisory_id=raw_alias).latest_per_avid()
for adv in advs:
advisories.add(adv)
except AdvisoryAlias.DoesNotExist:
continue
This issue appears to affect the following pipelines:
Activity
TG1999 commentedon Jun 11, 2026
This is fixed in #2340