修改Permssion --> Perm

pull/6/head
guanghongwei 2015-01-24 15:05:02 +08:00
parent d7d988b067
commit 34b78825d2
1 changed files with 1 additions and 1 deletions

View File

@ -51,4 +51,4 @@ def bool2str(value):
@register.filter(name='perm_count')
def perm_count(user_id):
user = User.objects.get(int(user_id))
return user.permission_set.all().count()
return user.perm_set.all().count()