e-hulp/HelpIM — Issue #164: Django Error in stats & forms: Field matching query does not exist
Author: winfried
Created: 2012-02-20 14:57:03+00:00
State: open
Labels: bug, django, High priority

Found on testchat1.e-hulp.nl:

=========
'PATH_INFO': u'/admin/stats/chatflat/'

Traceback (most recent call last):

File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
return view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.6/dist-packages/helpim/stats/views.py", line 62, in stats_overview
dictStats = statsProvider.render(currentYearChats)

File "/usr/local/lib/python2.6/dist-packages/helpim/conversations/stats.py", line 209, in render
for q, a in entry.question_answer_dict().iteritems():

File "/usr/local/lib/python2.6/dist-packages/helpim/questionnaire/models.py", line 49, in question_answer_dict
question = Field.objects.get(id=answer.field_id)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 349, in get
% self.model._meta.object_name)

DoesNotExist: Field matching query does not exist.

=========
'PATH_INFO': u'/forms/entry/304/edit',

Traceback (most recent call last):

File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.6/dist-packages/helpim/questionnaire/views.py", line 192, in form_entry_edit
the_field = Field.objects.get(pk=entry_field.field_id)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 349, in get
% self.model._meta.object_name)

DoesNotExist: Field matching query does not exist.