Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
etch
nuages
Commits
fc857945
Commit
fc857945
authored
Aug 30, 2011
by
Christophe Siraut
Browse files
Fixing #892 continuation.
parent
3d23d1b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
sondage/views.py
View file @
fc857945
...
...
@@ -188,10 +188,9 @@ def vote(request, poll_id):
return
HttpResponse
(
vorm
.
cleaned_data
[
'choice'
])
if
not
Vote
.
objects
.
filter
(
choice
=
choice
,
bulletin
=
bulletin
):
vorm
.
cleaned_data
[
'choice'
]
=
choice
new
=
vorm
.
save
(
commit
=
False
)
new
.
bulletin
=
bulletin
#new.choice = choice
new
=
Vote
(
choice
=
choice
,
bulletin
=
bulletin
,
comment
=
vorm
.
cleaned_data
[
'comment'
])
if
vorm
.
cleaned_data
[
'voice'
]:
new
.
voice
=
vorm
.
cleaned_data
[
'voice'
]
new
.
save
()
if
new
.
voice
:
choice
.
votecount
+=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment