Reputation: 2406
I have an error on a filter : need more than 1 value to unpack
Is it correct :
groups_list = Group.objects.filter({'assignment__in': editedcourse.assignment.all()})
I think it is a syntax error, or given arguments lack off but I can't correct it :/
Upvotes: 0
Views: 1203
Reputation: 22697
try without { } and ''
groups_list = Group.objects.filter(assignment__in= editedcourse.assignment.all())
or
ids = map(lambda x:x.id,editedcourse.assignment.all())
groups_list = Group.objects.filter(assignment__in=ids)
Upvotes: 1