Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviews causes: TypeError: Database is trying to update a relational field of type DecimalField with a value of type ProposalScoreExpression #72

Open
codersquid opened this issue May 14, 2015 · 0 comments

Comments

@codersquid
Copy link
Contributor

euroscipy@0956e8578eee5a7477585877eb3a012abb48cb2ehas a fix for this issue. This should be back merged.

ERROR Internal Server Error: /reviews/review/6/
Traceback (most recent call last):
File "/www/conf_site/env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, callback_args, *callback_kwargs)
File "/www/conf_site/env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 21, in wrapped_view
return view_func(request, args, *kwargs)
File "/www/conf_site/env/local/lib/python2.7/site-packages/symposion/reviews/views.py", line 203, in review_detail
review.save()
File "/www/conf_site/env/local/lib/python2.7/site-packages/symposion/reviews/models.py", line 131, in save
self.proposal.result.update_vote(self.vote)
File "/www/conf_site/env/local/lib/python2.7/site-packages/symposion/reviews/models.py", line 280, in update_vote
model.default_manager.filter(pk=self.pk).update(score=ProposalScoreExpression())
File "/www/conf_site/env/local/lib/python2.7/site-packages/django/db/models/query.py", line 583, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
File "/www/conf_site/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1004, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/www/conf_site/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 775, in execute_sql
sql, params = self.as_sql()
File "/www/conf_site/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 967, in as_sql
(field.__class.name, val.class.name))
TypeError: Database is trying to update a relational field of type DecimalField with a value of type ProposalScoreExpression. Make sure you are setting the correct relations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant