2👍
✅
Unless I’m overlooking something, you can do this with the queryset
method on StudentEnrolmentsInline:
def queryset(self, request):
current = Cycle.objects.latest() # or whatever to get the current cycle
qs = super(StudentEnrolmentsInline, self).queryset(request)
return qs.filter(school_class__cycle=current)
Source:stackexchange.com