Closed Bug 1098560 Opened 11 years ago Closed 4 years ago

Server error when in Event manager and viewing or editing an event with more than one survey associated

Categories

(Webtools Graveyard :: Air Mozilla, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: lfresh, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0 Build ID: 20141011015303 Steps to reproduce: 1. In Management dashboard/Initiate event create a new event 2. In Event Configuration/Surveys create a new survey and associate it with new event 3. Create another survey and associate it with the same new event 4. In Event manager attempt to view or edit event Actual results: A server error occurs Expected results: Should be able to view or edit the event
Here's a tip to get better tracebacks in Django. Add `DEBUG_PROPAGATE_EXCEPTIONS = True` to your airmozilla/settings/local.py and now you'll always get a full traditional python traceback in the terminal where you run `./manage.py runserver`.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I guess what I'm saying is :) that it would be nice to have the python traceback here in this bug.
Here you go: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/contrib/staticfiles/handlers.py", line 72, in __call__ return self.application(environ, start_response) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/core/handlers/wsgi.py", line 255, in __call__ response = self.get_response(request) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/core/handlers/base.py", line 176, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/core/handlers/base.py", line 113, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/views/generic/base.py", line 68, in view return self.dispatch(request, *args, **kwargs) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/views/generic/base.py", line 86, in dispatch return handler(request, *args, **kwargs) File "/Users/lisa/Projects/airmozilla/airmozilla/airmozilla/main/views.py", line 443, in get context['survey'] = Survey.objects.get(events=event, active=True) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/db/models/manager.py", line 143, in get return self.get_query_set().get(*args, **kwargs) File "/Users/lisa/Projects/airmozilla/airmozilla/vendor/lib/python/django/db/models/query.py", line 407, in get (self.model._meta.object_name, num)) MultipleObjectsReturned: get() returned more than one Survey -- it returned 2!
Is this bug what you fixed? Can we resolve it now?
This one hasn't been fixed yet. Are you able to reproduce?
Oh. You're right. That is unrelated to the feature you worked on. We still have the possibility to cause this if you have two surveys configured on an event.
Priority: -- → P2

Platform deprecated.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.