📜  'ManyRelatedManager' 对象不可迭代 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:43.931000             🧑  作者: Mango

代码示例1
# Call `.all()` on the thing

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

# WORKING
for friend in user.friends.all():
    ...