Cannot delete user

Issue #877 resolved
Gili created an issue


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\", line 213, in delete
  File "build\\egg\sqlalchemy\orm\", line 710, in commit
  File "build\\egg\sqlalchemy\orm\", line 368, in commit
  File "build\\egg\sqlalchemy\orm\", line 347, in _prepare_impl
  File "build\\egg\sqlalchemy\orm\", line 1734, in flush
  File "build\\egg\sqlalchemy\orm\", line 1805, in _flush
  File "build\\egg\sqlalchemy\orm\", line 331, in execute
  File "build\\egg\sqlalchemy\orm\", line 475, in execute
  File "build\\egg\sqlalchemy\orm\", line 59, in save_obj
    mapper, table, update)
  File "build\\egg\sqlalchemy\orm\", line 485, in _emit_update_statements
    execute(statement, params)
  File "build\\egg\sqlalchemy\engine\", line 1449, in execute
  File "build\\egg\sqlalchemy\engine\", line 1584, in _execute_clauseelement
    compiled_sql, distilled_params
  File "build\\egg\sqlalchemy\engine\", line 1698, in _execute_context
  File "build\\egg\sqlalchemy\engine\", line 1691, in _execute_context
  File "build\\egg\sqlalchemy\engine\", line 331, in do_execute
    cursor.execute(statement, parameters)
  File "c:\Users\Gili\Documents\rhodecode\lib\site-packages\MySQLdb\", line 201, in execute
    self.errorhandler(self, exc, value)
  File "c:\Users\Gili\Documents\rhodecode\lib\site-packages\MySQLdb\", 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