Coding/Python
[Python & Django] 에러해결 방법 !! MultipleObjectsReturned: get() returned more than one chatbot_log -- it returned 5!
포스트it
2023. 2. 2. 08:00
728x90
반응형
[Python & Django] 에러해결 방법 !!
MultipleObjectsReturned: get() returned more than one chatbot_log -- it returned 5!
data를 get_object_or_404를 통해 가지고 왔는데 objects.filter() 를 사용하여 가지고 왔더니 해결 되었습니다 :)
def list(request):
list = get_object_or_404(data) # 에러
list = dataList.objects.filter() # 이 방법으로 불러오면 해결!
728x90
반응형