1
Does this work?
for q in queryset:
q.user.is_active = True
q.user.save()
queryset.update(accepted=True)
0
ZZY’s answer was right and he should deserve credit , but I didn’t know that the attribute of user had to be is_active
instead of active
. I am assuming he didn’t know either based on the question itself.
The full answer would look like this:
for q in queryset:
q.user.is_active = True
q.user.save()
queryset.update(accepted=True)
Source:stackexchange.com