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

@ -103,7 +103,7 @@ class Annotation(models.Model):
def editable(self, user):
if user.is_authenticated():
if user.get_profile().capability('canEditAnnotations') or \
if user.profile.capability('canEditAnnotations') or \
self.user == user or \
user.groups.filter(id__in=self.item.groups.all()).count() > 0:
return True