First time here? Check out the FAQ!
0

FieldError: Cannot resolve keyword 'answer' into field.

Hello, all!

Next is error I've got after selecting any of the previous versions of my edits. How can I fix it?

Traceback (most recent call last):

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/core/handlers/base.py", line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/contrib/auth/decorators.py", line 23, in _wrapped_view
   return view_func(request, *args, **kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/utils/decorators.py", line 93, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/var/src/askbot-devel/askbot/utils/decorators.py", line 217, in wrapper
   return view_func(request, *args, **kwargs)

 File "/var/src/askbot-devel/askbot/views/writers.py", line 427, in edit_answer
   revision = rev

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/query.py", line 341, in get
   clone = self.filter(*args, **kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/query.py", line 550, in filter
   return self._filter_or_exclude(False, *args, **kwargs)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/query.py", line 568, in _filter_or_exclude
   clone.query.add_q(Q(*args, **kwargs))

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/sql/query.py", line 1194, in add_q
   can_reuse=used_aliases, force_having=force_having)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/sql/query.py", line 1069, in add_filter
   negate=negate, process_extras=process_extras)

 File "/var/src/askbot-devel/askbot_env/lib/python2.5/site-packages/Django-1.3.1-py2.5.egg/django/db/models/sql/query.py", line 1260, in setup_joins
   "Choices are: %s" % (name, ", ".join(names)))

**FieldError: Cannot resolve keyword 'answer' into field. Choices are: author, id, is_anonymous, post, revised_at, revision, revision_type, summary, tagnames, text, title**

Python: 2.5, Askbot: git-6e44222a68bc9edb506ab6598621532cbe6f5ced, Mysql-python: 1.2.3, MySQL: Ver 14.12 Distrib 5.0.51a

Olloff's avatar
97
Olloff
asked 2012-03-16 09:29:55 -0600, updated 2012-03-16 09:46:56 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Thanks! Just fixed in the repo.

We have migrated models from Question, Answer, and Comment to just Post, this bug was due to not changing reference from answer to post.

Evgeny's avatar
13.2k
Evgeny
answered 2012-03-16 09:54:20 -0600
edit flag offensive 0 remove flag delete link

Comments

Thanks, Eugeny!

Olloff's avatar Olloff (2012-03-16 10:15:09 -0600) edit

Besides, I pull lastest git-8a8cde4fb9957ad829682870ec9dc87f0fe50ac7 from repo and do "manage.py syncdb & manage.py migrate", but problem still in sight. Sorry, fixed after Apache restart.

Olloff's avatar Olloff (2012-03-16 10:19:07 -0600) edit
add a comment see more comments