From de10cfde6579fb08ddb2118dc0df26bf3eea84b4 Mon Sep 17 00:00:00 2001 From: Chris Van Date: Wed, 16 May 2012 14:32:48 -0700 Subject: [PATCH] add default ip_address for Rating model (bug 746765) --- migrations/403-ratings-ip-address.sql | 1 + mkt/ratings/models.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 migrations/403-ratings-ip-address.sql diff --git a/migrations/403-ratings-ip-address.sql b/migrations/403-ratings-ip-address.sql new file mode 100644 index 0000000000..5976d1afb7 --- /dev/null +++ b/migrations/403-ratings-ip-address.sql @@ -0,0 +1 @@ +ALTER TABLE ratings CHANGE COLUMN ip_address ip_address char(15) NOT NULL; diff --git a/mkt/ratings/models.py b/mkt/ratings/models.py index 1373d831e8..c3a23a2940 100644 --- a/mkt/ratings/models.py +++ b/mkt/ratings/models.py @@ -31,7 +31,7 @@ class Rating(amo.models.ModelBase): score = models.PositiveSmallIntegerField(null=True) body = TranslatedField(require_locale=False) - ip_address = models.IPAddressField() + ip_address = models.IPAddressField(default='0.0.0.0') editorreview = models.BooleanField(default=False) flag = models.BooleanField(default=False)