﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
4287	FloatField will not handle infinity values	oBeattie (oliver@…	dlanger	"When saving an object with an infinity float in a FloatField, the database throws an error (in MySQL at least):

{{{
Traceback (most recent call last):
  File ""<console>"", line 2, in ?
  File ""/Django/obeattie/../obeattie/generic/managers.py"", line 104, in sync_for_location
    condition.save()
  File ""/opt/local/lib/python2.4/site-packages/django/db/models/base.py"", line 243, in save
    ','.join(placeholders)), db_values)
  File ""/opt/local/lib/python2.4/site-packages/django/db/backends/util.py"", line 12, in execute
    return self.cursor.execute(sql, params)
  File ""/opt/local/lib/python2.4/site-packages/MySQLdb/cursors.py"", line 163, in execute
    self.errorhandler(self, exc, value)
  File ""/opt/local/lib/python2.4/site-packages/MySQLdb/connections.py"", line 35, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1054, ""Unknown column 'inf' in 'field list'"")
}}}

While I realize that while this may not be a problem with Django itself, it certainly is a flaw, as Python does support infinite floats? Would it be possible to work around this at all (without resorting to 999… values?)"	Bug	closed	Database layer (models, ORM)	dev	Normal	fixed	nan, infinity, mysql, float	oliver@… calmez maxime.bargiel@…	Accepted	1	0	0	0	0	0
