Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

[traceback] multiple objects returned error for /en-US/badges/tag/Slovenija #119

Open
willkg opened this issue Feb 23, 2015 · 0 comments
Open

Comments

@willkg
Copy link
Member

willkg commented Feb 23, 2015

I keep seeing these in the server error emails:

Traceback (most recent call last):

  File "/data/www/badges.mozilla.org/badges/virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/data/www/badges.mozilla.org/badges/virtualenv/lib/python2.6/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)

  File "/data/www/badges.mozilla.org/badges/virtualenv/lib/python2.6/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)

  File "/data/www/badges.mozilla.org/badges/virtualenv/lib/python2.6/site-packages/django/views/generic/list.py", line 137, in get
    self.object_list = self.get_queryset()

  File "/data/www/badges.mozilla.org/badges/badger/views.py", line 80, in get_queryset
    tag = get_object_or_404(Tag, name=tag_name)

  File "/data/www/badges.mozilla.org/badges/virtualenv/lib/python2.6/site-packages/django/shortcuts/__init__.py", line 113, in get_object_or_404
    return queryset.get(*args, **kwargs)

  File "/data/www/badges.mozilla.org/badges/virtualenv/lib/python2.6/site-packages/django/db/models/query.py", line 313, in get
    (self.model._meta.object_name, num))

MultipleObjectsReturned: get() returned more than one Tag -- it returned 2!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant