﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36631	Support nested relations in FilteredRelation's condition is broken	nad2000		"The support of nested relations in FilteredRelation, implemented with  #29789 Support nested relations in FilteredRelation's condition (3.2), is broken:

This bug resurfaced with 5.2. (after upgrading from 5.1.9). The queryset causing this issue (""ValueError: FilteredRelation's condition doesn't support nested relations deeper than the relation_name (got 'conflict_of_interestspanellistuser' for 'conflict_of_interests').""):


{{{#!python
queryset = queryset.filter(round__panellists__user=user, state=""submitted"").annotate(
    coi=FilteredRelation(
        ""conflict_of_interests"",
        condition=Q(conflict_of_interests__panellist__user=user),
    )
)
}}}
"	Bug	closed	Database layer (models, ORM)	5.2	Normal	worksforme	FilteredRelation nested relations		Unreviewed	0	0	0	0	0	0
