mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
add TUVoteInfo.total_votes()
Returns the sum of TUVoteInfo.Yes, TUVoteInfo.No and TUVoteInfo.Abstain. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
ac1779b705
commit
83c038a42a
2 changed files with 21 additions and 0 deletions
|
@ -90,3 +90,6 @@ class TUVoteInfo(Base):
|
|||
|
||||
def is_running(self):
|
||||
return self.End > int(datetime.utcnow().timestamp())
|
||||
|
||||
def total_votes(self):
|
||||
return self.Yes + self.No + self.Abstain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue