Skip to content
Browse files

Should delete individually.

  • Loading branch information...
1 parent 6ce6345 commit 8a7151dc9bf9be7dd3e7e4b64a88f3e835f6045c @dram committed Sep 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 jaikuengine/common/user.py
View
3 jaikuengine/common/user.py
@@ -72,7 +72,8 @@ def purge_expired_user_auth_token_keys():
objs = Session.objects.filter(expire_date__lte=api.utcnow())
expired_tokens = objs.count()
if expired_tokens:
- objs[:limit].delete()
+ for obj in objs[:limit]:
+ obj.delete()
logging.info("Removed %d expired user authentication "
"tokens (%d remaining)",
min(limit, expired_tokens),

0 comments on commit 8a7151d

Please sign in to comment.
Something went wrong with that request. Please try again.