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 5191 "Handle ""None"" when type is " Ari Kivimäki Adrian Holovaty "Apparently at least pysqlite 2.3.5 (with Python 2.5) returns ""None"" () instead of None () when a field is NULL. This causes problems with Django when conditional statement compares solely to NoneType and passes string values. Fortunately this is easily fixed: if the conditional statement (if not s: return None) on [http://code.djangoproject.com/browser/django/trunk/django/db/backends/util.py#L73 db/backends/util.py] line 73 is added another condition to satisfy str type ""None"" (if not s or s == ""None"": return None)." closed Database layer (models, ORM) dev invalid None NoneType str String Unreviewed 0 0 0 0 0 0