Answers for "'ManyRelatedManager' object is not iterable"

0

'ManyRelatedManager' object is not iterable

# Call `.all()` on the thing

# ERROR
for friend in user.friends:
    ...

# WORKING
for friend in user.friends.all():
    ...
Posted by: Guest on October-20-2021

Code answers related to "'ManyRelatedManager' object is not iterable"

Python Answers by Framework

Browse Popular Code Answers by Language