Ask Your Question
1

Bug: Deleting a User

asked 2013-09-18 03:31:02 -0500

Rupreck gravatar image

Please advise how to resolve:

Deleting a user from admin/auth/user/XXX/delete/ leads to:

DatabaseError: (1146, "Table 'askbot.group_messaging_lastvisittime' doesn't exist")

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, callback_args, *callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", line 366, in wrapper return self.admin_site.admin_view(view)(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py", line 196, in inner return view(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 25, in _wrapper return bound_func(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 21, in bound_func return func(self, args2, *kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 209, in inner return func(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", line 1274, in delete_view [obj], opts, request.user, self.admin_site, using)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/util.py", line 104, in get_deleted_objects collector.collect(objs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/util.py", line 155, in collect return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/db/models/deletion.py", line 175, in collect if not sub_objs:

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 130, in __nonzero__ iter(self).next()

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 118, in _result_iter self._fill_cache()

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 875, in _fill_cache self._result_cache.append(self._iter.next())

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 291, in iterator for row in compiler.results_iter():

File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 763, in results_iter for rows in self.execute_sql(MULTI):

File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params)

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 114, in execute return self.cursor.execute(query, args)

File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 201, in execute self.errorhandler(self, exc, value)

File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue

DatabaseError: (1146, "Table 'askbot.group_messaging_lastvisittime' doesn't exist")

Note that this database was migrated successfully from 0.6 ... (more)

edit retag flag offensive close merge delete

Comments

1

"Table does not exist" points to an issue in the database - a missing table - try running `python manage.py syncdb --migrate`.

Evgeny gravatar imageEvgeny ( 2013-09-23 11:30:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-09-23 07:57:27 -0500

Mustafa gravatar image

It's better to not delete any user. And only move this user to blocked user group.

Blocked users can only login and send feedback to the site administrators, their url and profile will also be hidden.

edit flag offensive delete link more

Comments

2

The Problem is when you have to block 100 users. You need too much time, but deleting via /admin panel is faster, because you can find all users with emails a@fake.com, b@fake.com ,... at once

Toms gravatar imageToms ( 2013-09-23 10:47:40 -0500 )edit
1

@Toms that's a good point, we'll need to implement bulk user moderation in the future versions.

Evgeny gravatar imageEvgeny ( 2013-09-23 11:28:48 -0500 )edit
1

@Evgeny@Toms there was this bulk user moderation features in OSQA, which I liked for such purposes. I don't know why it was removed for Askbot.

pajju gravatar imagepajju ( 2013-09-28 01:35:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-09-18 03:31:02 -0500

Seen: 240 times

Last updated: Sep 23 '13