user.get_profile()->user.profile

This commit is contained in:
j 2016-02-19 22:04:15 +05:30
commit 1cc795995d
27 changed files with 72 additions and 70 deletions

View file

@ -219,7 +219,7 @@ class ClipManager(Manager):
qs = qs.filter(sort__rightslevel__lte=allowed_level)
#users can see public clips, there own clips and clips of there groups
else:
allowed_level = settings.CONFIG['capabilities']['canSeeItem'][user.get_profile().get_level()]
allowed_level = settings.CONFIG['capabilities']['canSeeItem'][user.profile.get_level()]
q = Q(sort__rightslevel__lte=allowed_level)|Q(user=user.id)
if user.groups.count():
q |= Q(item__groups__in=user.groups.all())