Skip to content
Snippets Groups Projects
Commit feac15e4 authored by Shirlei Chaves's avatar Shirlei Chaves
Browse files

Add castvote cast_ip field

parent 7d135e7c
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('helios', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='castvote',
name='cast_ip',
field=models.GenericIPAddressField(null=True),
preserve_default=True,
),
]
......@@ -980,6 +980,9 @@ class CastVote(HeliosModel):
verified_at = models.DateTimeField(null=True)
invalidated_at = models.DateTimeField(null=True)
# auditing purposes, like too many votes from the same IP, if it isn't expected
cast_ip = models.GenericIPAddressField(null=True)
@property
def datatype(self):
return self.voter.datatype.replace('Voter', 'CastVote')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment