Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultipleObjectsReturned at /product/shirt/ get() returned more than one Item -- it returned 2! #76

Open
anmolsinghsaini opened this issue May 18, 2021 · 0 comments

Comments

@anmolsinghsaini
Copy link

When I click on the product I get this error and not able to get product page.

Traceback (most recent call last):
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\views\generic\base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\views\generic\base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\views\generic\detail.py", line 106, in get
self.object = self.get_object()
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\views\generic\detail.py", line 52, in get_object
obj = queryset.get()
File "C:\Users\Anmol\Envs\hybrid\lib\site-packages\django\db\models\query.py", line 410, in get
raise self.model.MultipleObjectsReturned(
core.models.Item.MultipleObjectsReturned: get() returned more than one Item -- it returned 2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant