fix userprofile level bug

This commit is contained in:
baoliang 2021-01-26 15:49:57 +08:00
parent e2f0507e68
commit fcd342ed21
1 changed files with 2 additions and 2 deletions

View File

@ -193,9 +193,9 @@ class Userprofile(models.Model):
return Userprofile.objects.filter(Q(organization__level__level=1) | Q(organization__level__level=9)) return Userprofile.objects.filter(Q(organization__level__level=1) | Q(organization__level__level=9))
def __str__(self): def __str__(self):
if self.is_level1: if self.is_level1():
return '省级管理员%s' % (self.name,) return '省级管理员%s' % (self.name,)
elif self.is_level2: elif self.is_level2():
return '市级管理员%s' % (self.name,) return '市级管理员%s' % (self.name,)
return self.name return self.name