2011-03-23 15:24:59 |
Michael Nelson |
description |
Environment:
Request Method: POST
Request URL: http://reviews.staging.ubuntu.com/reviews/api/1.0/reviews/
Django Version: 1.1.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django_openid_auth',
'django_configglue',
'reviewsapp',
'south']
Installed Middleware:
['django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware']
Traceback:
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/pymodules/python2.6/django/views/decorators/vary.py" in inner_func
21. response = func(*args, **kwargs)
File "/usr/lib/python2.6/dist-packages/piston/resource.py" in __call__
74. if not self.authentication.is_authenticated(request):
File "/usr/lib/python2.6/dist-packages/reviewsapp/auth.py" in is_authenticated
78. return super(SSOOAuthAuthentication, self).is_authenticated(request)
File "/usr/lib/python2.6/dist-packages/piston/authentication.py" in is_authenticated
226. consumer, token, parameters = self.validate_token(request)
File "/usr/lib/python2.6/dist-packages/reviewsapp/auth.py" in validate_token
120. return oauth_server.verify_request(oauth_request)
File "/usr/lib/python2.6/dist-packages/oauth/oauth.py" in verify_request
433. consumer = self._get_consumer(oauth_request)
File "/usr/lib/python2.6/dist-packages/oauth/oauth.py" in _get_consumer
481. consumer = self.data_store.lookup_consumer(consumer_key)
File "/usr/lib/python2.6/dist-packages/reviewsapp/models/oauthtoken.py" in lookup_consumer
161. consumer = Consumer.objects.get(key=consumer_key)
File "/usr/lib/pymodules/python2.6/django/db/models/manager.py" in get
120. return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/django/db/models/query.py" in get
307. % (self.model._meta.object_name, num, kwargs))
Exception Type: MultipleObjectsReturned at /reviews/api/1.0/reviews/
Exception Value: get() returned more than one Consumer -- it returned 2! Lookup parameters were {'key': '6ehHBGz'} |
Environment:
Request Method: POST
Request URL: http://reviews.staging.ubuntu.com/reviews/api/1.0/reviews/
Django Version: 1.1.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django_openid_auth',
'django_configglue',
'reviewsapp',
'south']
Installed Middleware:
['django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware']
Traceback:
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/pymodules/python2.6/django/views/decorators/vary.py" in inner_func
21. response = func(*args, **kwargs)
File "/usr/lib/python2.6/dist-packages/piston/resource.py" in __call__
74. if not self.authentication.is_authenticated(request):
File "/usr/lib/python2.6/dist-packages/reviewsapp/auth.py" in is_authenticated
78. return super(SSOOAuthAuthentication, self).is_authenticated(request)
File "/usr/lib/python2.6/dist-packages/piston/authentication.py" in is_authenticated
226. consumer, token, parameters = self.validate_token(request)
File "/usr/lib/python2.6/dist-packages/reviewsapp/auth.py" in validate_token
120. return oauth_server.verify_request(oauth_request)
File "/usr/lib/python2.6/dist-packages/oauth/oauth.py" in verify_request
433. consumer = self._get_consumer(oauth_request)
File "/usr/lib/python2.6/dist-packages/oauth/oauth.py" in _get_consumer
481. consumer = self.data_store.lookup_consumer(consumer_key)
File "/usr/lib/python2.6/dist-packages/reviewsapp/models/oauthtoken.py" in lookup_consumer
161. consumer = Consumer.objects.get(key=consumer_key)
File "/usr/lib/pymodules/python2.6/django/db/models/manager.py" in get
120. return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/django/db/models/query.py" in get
307. % (self.model._meta.object_name, num, kwargs))
Exception Type: MultipleObjectsReturned at /reviews/api/1.0/reviews/
Exception Value: get() returned more than one Consumer -- it returned 2! Lookup parameters were {'key': '6ehHBGz'}
QA Notes:
Verified this by watching the log on the server and seeing:
2011-03-23 15:14:08,587 - reviewsapp.models.oauthtoken - INFO - consumer_key=QBbQpLf has 2 entries in the database
but without hitting an error. |
|