Ask Your Question
0

FieldError: Cannot resolve keyword 'answer' into field.

asked 2012-03-16 09:29:55 -0600

Olloff gravatar image

updated 2012-03-16 09:46:56 -0600

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-03-16 09:54:20 -0600

Evgeny gravatar image

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.

edit flag offensive delete link more

Comments

Thanks, Eugeny!

Olloff gravatar imageOlloff ( 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 gravatar imageOlloff ( 2012-03-16 10:19:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-03-16 09:29:55 -0600

Seen: 2,086 times

Last updated: Mar 16 '12