Answers for "MultipleObjectsReturned: get() returned more than one Question -- it returned 3!"

0

MultipleObjectsReturned: get() returned more than one Question -- it returned 3!

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)
Posted by: Guest on January-15-2021

Code answers related to "MultipleObjectsReturned: get() returned more than one Question -- it returned 3!"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language