From: Feng Yang Subject: [PATCH] Change decimal_places from 31 to 2 in frontend/tko/models.py Date: Mon, 22 Mar 2010 17:42:16 +0800 Message-ID: <1269250936-9550-1-git-send-email-fyang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: autotest@test.kernel.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org decimal_places must less-than-or-equal-to max_digits in 'numeric(max_digits, decimal_places)' in mysql syntax. max_digits is 12, so decimal_places must <= 12. Set decimal_places to 2. Signed-off-by: Feng Yang --- frontend/tko/models.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/frontend/tko/models.py b/frontend/tko/models.py index 7348b07..abf12b2 100644 --- a/frontend/tko/models.py +++ b/frontend/tko/models.py @@ -231,7 +231,7 @@ class IterationResult(dbmodels.Model, model_logic.ModelExtensions): test = dbmodels.ForeignKey(Test, db_column='test_idx', primary_key=True) iteration = dbmodels.IntegerField() attribute = dbmodels.CharField(max_length=90) - value = dbmodels.DecimalField(null=True, max_digits=12, decimal_places=31, + value = dbmodels.DecimalField(null=True, max_digits=12, decimal_places=2, blank=True) objects = model_logic.ExtendedManager() -- 1.5.5.6