Skip to content

django.db.utils.IntegrityError: (1048, "Column 'description' cannot be null")

The hourly run "sync_mailman" job raises this error for me. I added a new mailinglist in postorius WITH a description, but the corresponding field in hyperkitty's database is empty. The error doesn't even go away if I manualy set it to the same as in mailman's db. I'm not sure wether my installation is broken or what's going on.

ERROR OCCURED IN JOB: sync_mailman (APP: None)
START TRACEBACK:
Traceback (most recent call last):
  File "/srv/django/env/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/srv/django/env/lib/python3.6/site-packages/MySQLdb/cursors.py", line 198, in execute
    res = self._query(query)
  File "/srv/django/env/lib/python3.6/site-packages/MySQLdb/cursors.py", line 304, in _query
    db.query(q)
  File "/srv/django/env/lib/python3.6/site-packages/MySQLdb/connections.py", line 217, in query
    _mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1048, "Column 'description' cannot be null")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/django/env/lib/python3.6/site-packages/django_extensions/management/commands/runjob.py", line 35, in runjob
    job().execute()
  File "/srv/django/env/lib/python3.6/site-packages/hyperkitty/jobs/sync_mailman.py", line 35, in execute
    sync_with_mailman()
  File "/srv/django/env/lib/python3.6/site-packages/hyperkitty/lib/mailman.py", line 131, in sync_with_mailman
    mlist.update_from_mailman()
  File "/srv/django/env/lib/python3.6/site-packages/hyperkitty/models/mailinglist.py", line 192, in update_from_mailman
    self.save()
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/base.py", line 718, in save
    force_update=force_update, update_fields=update_fields)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/base.py", line 748, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/base.py", line 812, in _save_table
    forced_update)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/base.py", line 861, in _do_update
    return filtered._update(values) > 0
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/query.py", line 712, in _update
    return query.get_compiler(self.db).execute_sql(CURSOR)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1383, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1065, in execute_sql
    cursor.execute(sql, params)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "/srv/django/env/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 76, in execute
    raise utils.IntegrityError(*tuple(e.args))
django.db.utils.IntegrityError: (1048, "Column 'description' cannot be null")
END TRACEBACK