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

@ -305,7 +305,7 @@ class File(models.Model):
return srt
def editable(self, user):
p = user.get_profile()
p = user.profile
return p.get_level() in ('admin', 'staff') or \
(not self.available and p.capability('canAddItems')) or \
self.instances.filter(volume__user=user).count() > 0 or \