📜  MultipleObjectsReturned: get() 返回了多个问题——它返回了 3 个! - Shell-Bash 代码示例

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

代码示例1
Model.objects.get(field_name=some_param)

# So instead of using get() you should use filter() 
# which will return multiple records. Such as

Model.objects.filter(field_name=some_param)