{"action":"closed","issue":{"url":"https://api.github.com/repos/stefanfoulis/django-phonenumber-field/issues/1","repository_url":"https://api.github.com/repos/stefanfoulis/django-phonenumber-field","labels_url":"https://api.github.com/repos/stefanfoulis/django-phonenumber-field/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/stefanfoulis/django-phonenumber-field/issues/1/comments","events_url":"https://api.github.com/repos/stefanfoulis/django-phonenumber-field/issues/1/events","html_url":"https://github.com/stefanfoulis/django-phonenumber-field/issues/1","id":1653372,"number":1,"title":"If blank=True, it's impossible to save an empty phone number","user":{"login":"GMLudo","id":243823,"avatar_url":"https://avatars.githubusercontent.com/u/243823?v=3","gravatar_id":"","url":"https://api.github.com/users/GMLudo","html_url":"https://github.com/GMLudo","followers_url":"https://api.github.com/users/GMLudo/followers","following_url":"https://api.github.com/users/GMLudo/following{/other_user}","gists_url":"https://api.github.com/users/GMLudo/gists{/gist_id}","starred_url":"https://api.github.com/users/GMLudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GMLudo/subscriptions","organizations_url":"https://api.github.com/users/GMLudo/orgs","repos_url":"https://api.github.com/users/GMLudo/repos","events_url":"https://api.github.com/users/GMLudo/events{/privacy}","received_events_url":"https://api.github.com/users/GMLudo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2011-09-15T14:25:53Z","updated_at":"2016-02-29T13:09:00Z","closed_at":"2016-02-29T13:09:00Z","body":"If you define a field like this in your models.py:\r\n\r\n```python\r\n    faxnumber = PhoneNumberField(u'Fax',max_length=40,blank=True)\r\n\r\nYou'll have this backtrace:\r\n\r\nEnvironment:\r\n\r\n\r\nRequest Method: POST\r\nRequest URL: http://morphee.hq.eyepea.be:8001/admin/xivo_web/entity/3/\r\n\r\nDjango Version: 1.3.1\r\nPython Version: 2.5.2\r\nInstalled Applications:\r\n['django.contrib.auth',\r\n 'django.contrib.contenttypes',\r\n 'django.contrib.sessions',\r\n 'django.contrib.sites',\r\n 'django.contrib.messages',\r\n 'django.contrib.staticfiles',\r\n 'django.contrib.admin',\r\n 'xivo_web']\r\nInstalled Middleware:\r\n('django.middleware.common.CommonMiddleware',\r\n 'django.contrib.sessions.middleware.SessionMiddleware',\r\n 'django.middleware.csrf.CsrfViewMiddleware',\r\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n 'django.contrib.messages.middleware.MessageMiddleware')\r\n\r\n\r\nTraceback:\r\nFile \"/usr/lib/python2.5/site-packages/django/core/handlers/base.py\" in get_response\r\n  111.                         response = callback(request, *callback_args, **callback_kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/contrib/admin/options.py\" in wrapper\r\n  307.                 return self.admin_site.admin_view(view)(*args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/utils/decorators.py\" in _wrapped_view\r\n  93.                     response = view_func(request, *args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/views/decorators/cache.py\" in _wrapped_view_func\r\n  79.         response = view_func(request, *args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py\" in inner\r\n  197.             return view(request, *args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/utils/decorators.py\" in _wrapper\r\n  28.             return bound_func(*args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/utils/decorators.py\" in _wrapped_view\r\n  93.                     response = view_func(request, *args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/utils/decorators.py\" in bound_func\r\n  24.                 return func(self, *args2, **kwargs2)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/transaction.py\" in inner\r\n  217.                 res = func(*args, **kwargs)\r\nFile \"/usr/lib/python2.5/site-packages/django/contrib/admin/options.py\" in change_view\r\n  982.                 self.save_model(request, new_object, form, change=True)\r\nFile \"/usr/lib/python2.5/site-packages/django/contrib/admin/options.py\" in save_model\r\n  665.         obj.save()\r\nFile \"/usr/lib/python2.5/site-packages/django/db/models/base.py\" in save\r\n  460.         self.save_base(using=using, force_insert=force_insert, force_update=force_update)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/models/base.py\" in save_base\r\n  526.                         rows = manager.using(using).filter(pk=pk_val)._update(values)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/models/query.py\" in _update\r\n  491.         return query.get_compiler(self.db).execute_sql(None)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py\" in execute_sql\r\n  869.         cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/models/sql/compiler.py\" in execute_sql\r\n  735.         cursor.execute(sql, params)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/backends/util.py\" in execute\r\n  34.             return self.cursor.execute(sql, params)\r\nFile \"/usr/lib/python2.5/site-packages/django/db/backends/mysql/base.py\" in execute\r\n  86.             return self.cursor.execute(query, args)\r\nFile \"/var/lib/python-support/python2.5/MySQLdb/cursors.py\" in execute\r\n  168.         if not self._defer_warnings: self._warning_check()\r\nFile \"/var/lib/python-support/python2.5/MySQLdb/cursors.py\" in _warning_check\r\n  82.                     warn(w[-1], self.Warning, 3)\r\nFile \"/usr/lib/python2.5/warnings.py\" in warn\r\n  62.                   globals)\r\nFile \"/usr/lib/python2.5/warnings.py\" in warn_explicit\r\n  102.         raise message\r\n\r\nException Type: Warning at /admin/xivo_web/entity/3/\r\nException Value: Column 'faxnumber' cannot be null"}}