[Django]-Limiting the options of foreign key in ModelAdmin returns "Select a valid choice"

3👍

Try replacing

 t = modelSchool.objects.filter(user=request.user).values_list("school_name",flat=True)

with this

modelSchool.objects.filter(user=request.user)

you dont need to value_list your query set.

Leave a comment