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
Political Memory
memopol
Commits
ffe144e0
Commit
ffe144e0
authored
Dec 06, 2015
by
Jamesie Pic
Browse files
Oh, just fixed score update ^^
parent
8ff84b92
Changes
1
Hide whitespace changes
Inline
Side-by-side
votes/models.py
View file @
ffe144e0
...
...
@@ -63,18 +63,19 @@ class MemopolVote(Vote):
@
cached_property
def
absolute_score
(
self
):
if
self
.
proposal
.
recommendation
:
recommendation
=
self
.
proposal
.
recommendation
weight
=
recommendation
.
weight
if
(
self
.
position
==
'abstain'
or
if
not
self
.
proposal
.
recommendation_id
:
return
0
recommendation
=
self
.
proposal
.
recommendation
weight
=
recommendation
.
weight
if
(
self
.
position
==
'abstain'
or
recommendation
.
recommendation
==
'abstain'
):
weight
=
weight
/
2
if
self
.
position
==
recommendation
.
recommendation
:
return
weight
else
:
return
-
weight
weight
=
weight
/
2
if
self
.
position
==
recommendation
.
recommendation
:
return
weight
else
:
return
0
return
-
weight
def
vote_pre_import
(
sender
,
vote_data
=
None
,
**
kwargs
):
...
...
Write
Preview
Supports
Markdown
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