Issue #877 resolved
Gili created an issue

Hi,

There seems to be a bug which prevents users from being deleted. To repro:

  1. Go into Admin -> User Management
  2. For one of the users, click "delete"
  3. Exception is thrown:
2013-07-05 15:12:43.204 ERROR [rhodecode.controllers.admin.users] Traceback (most recent call last):
  File "c:\Users\Gili\Documents\rhodecode\lib\site-packages\rhodecode-1.7.1-py2.7.egg\rhodecode\controllers\admin\users.py", line 213, in delete
    Session().commit()
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\session.py", line 710, in commit
    self.transaction.commit()
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\session.py", line 368, in commit
    self._prepare_impl()
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\session.py", line 347, in _prepare_impl
    self.session.flush()
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\session.py", line 1734, in flush
    self._flush(objects)
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\session.py", line 1805, in _flush
    flush_context.execute()
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\unitofwork.py", line 331, in execute
    rec.execute(self)
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\unitofwork.py", line 475, in execute
    uow
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\persistence.py", line 59, in save_obj
    mapper, table, update)
  File "build\bdist.win-amd64\egg\sqlalchemy\orm\persistence.py", line 485, in _emit_update_statements
    execute(statement, params)
  File "build\bdist.win-amd64\egg\sqlalchemy\engine\base.py", line 1449, in execute
    params)
  File "build\bdist.win-amd64\egg\sqlalchemy\engine\base.py", line 1584, in _execute_clauseelement
    compiled_sql, distilled_params
  File "build\bdist.win-amd64\egg\sqlalchemy\engine\base.py", line 1698, in _execute_context
    context)
  File "build\bdist.win-amd64\egg\sqlalchemy\engine\base.py", line 1691, in _execute_context
    context)
  File "build\bdist.win-amd64\egg\sqlalchemy\engine\default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
  File "c:\Users\Gili\Documents\rhodecode\lib\site-packages\MySQLdb\cursors.py", line 201, in execute
    self.errorhandler(self, exc, value)
  File "c:\Users\Gili\Documents\rhodecode\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (OperationalError) (1048, "Column 'user_id' cannot be null") 'UPDATE user_logs SET user_id=%s WHERE user_logs.user_log_id = %s' (None, 322L)

Comments (5)

  1. Marcin Kuzminski repo owner

    What version are you using ? I see that in db model definition that column can be null. Did you upgrade your instance from some older versions of RhodeCode ?

  2. Gili reporter

    I am using version 1.7.1, upgraded from an older version (I think 1.5.4). The reason I upgraded in the first place was because this bug existed in the older version.

    What can I do to fix this? :)

  3. Gili reporter

    I was forced to reinstall Rhodecode in the end. You can close this issue unless you plan on investigating further.

  4. Log in to comment