1. Marcin Kuzminski
  2. RhodeCode
  3. Issues

Issues

Issue #505 resolved

Error when adding permissions

tmatrifork
created an issue

Hi!

When adding user and group permissions on a repo I sometimes get the following error. It's a bit weird since it's not consistent.

2012-07-19 10:37:59.766 ERROR [rhodecode.controllers.settings] Traceback (most recent call last): File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/controllers/settings.py", line 106, in update invalidate_cache('get_repo_cached_%s' % repo_name) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/lib/utils.py", line 346, in invalidate_cache ScmModel().mark_for_invalidation(name) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/model/scm.py", line 291, in mark_for_invalidation CacheInvalidation.set_invalidate(repo_name) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/model/db.py", line 1354, in set_invalidate inv_objs = Session().query(cls).filter(cls.cache_args == _org_key).all() File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2115, in all return list(self) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/rhodecode/lib/caching_query.py", line 83, in iter return Query.iter(self) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2226, in iter self.session._autoflush() File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1012, in _autoflush self.flush() File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1583, in flush self._flush(objects) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1654, in _flush flush_context.execute() File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 331, in execute rec.execute(self) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 475, in execute uow File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 64, in save_obj table, insert) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 558, in _emit_insert_statements execute(statement, params) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute params) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement compiled_sql, distilled_params File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context context) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context context) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute cursor.execute(statement, parameters) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute self.errorhandler(self, exc, value) File "/data/products/rhodecode/venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (OperationalError) (1048, "Column 'users_group_id' cannot be null") 'INSERT INTO users_group_repo_to_perm (users_group_id, permission_id, repository_id) VALUES (%s, %s, %s)' (None, 3L, 178L)

Best regards, Thomas

Comments (3)

  1. Log in to comment