Skip to content

Instantly share code, notes, and snippets.

@calston
Created December 9, 2013 12:59
Show Gist options
  • Save calston/7871923 to your computer and use it in GitHub Desktop.
Save calston/7871923 to your computer and use it in GitHub Desktop.
MultipleObjectsReturned: get() returned more than one GeneralPreferences -- it returned 2! Lookup parameters were {}
ERROR 2013-12-09 14:59:28,156 base 18128 140388145288960 Internal Server Error: /logo/
Traceback (most recent call last):
File "/var/praekelt/eggs/Django-1.4.1-py2.7.egg/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/var/praekelt/eggs/Django-1.4.1-py2.7.egg/django/views/generic/simple.py", line 26, in direct_to_template
c = RequestContext(request, dictionary)
File "/var/praekelt/eggs/Django-1.4.1-py2.7.egg/django/template/context.py", line 176, in __init__
self.update(processor(request))
File "/var/praekelt/eggs/jmbo_foundry-1.1.21-py2.7.egg/foundry/context_processors.py", line 13, in foundry
'ANALYTICS_TAGS': get_preference('GeneralPreferences', 'analytics_tags'),
File "/var/praekelt/eggs/jmbo_foundry-1.1.21-py2.7.egg/foundry/utils.py", line 52, in get_preference
v = getattr(getattr(preferences, klass_name), attr)
File "/var/praekelt/eggs/django_preferences-0.0.6-py2.7.egg/preferences/models.py", line 39, in <lambda>
property(lambda x: cls.singleton.get()))
File "/var/praekelt/eggs/Django-1.4.1-py2.7.egg/django/db/models/manager.py", line 131, in get
return self.get_query_set().get(*args, **kwargs)
File "/var/praekelt/eggs/django_preferences-0.0.6-py2.7.egg/preferences/managers.py", line 27, in get_query_set
queryset.get()
File "/var/praekelt/eggs/Django-1.4.1-py2.7.egg/django/db/models/query.py", line 368, in get
% (self.model._meta.object_name, num, kwargs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment