This commit is contained in:
parent
764e992fcc
commit
24f94a092e
1 changed files with 1 additions and 6 deletions
|
@ -33,11 +33,6 @@ class UserProfile(models.Model):
|
||||||
info = DictField(default={})
|
info = DictField(default={})
|
||||||
notes = models.TextField(default='')
|
notes = models.TextField(default='')
|
||||||
|
|
||||||
def get_preferences(self):
|
|
||||||
prefs = self.preferences
|
|
||||||
prefs['email'] = self.user.email
|
|
||||||
return prefs
|
|
||||||
|
|
||||||
def get_ui(self):
|
def get_ui(self):
|
||||||
return get_ui(self.ui, self.user)
|
return get_ui(self.ui, self.user)
|
||||||
|
|
||||||
|
@ -154,7 +149,7 @@ def init_user(user, request=None):
|
||||||
result[key] = getattr(user, key)
|
result[key] = getattr(user, key)
|
||||||
result['level'] = profile.get_level()
|
result['level'] = profile.get_level()
|
||||||
result['groups'] = [g.name for g in user.groups.all()]
|
result['groups'] = [g.name for g in user.groups.all()]
|
||||||
result['preferences'] = profile.get_preferences()
|
result['email'] = user.email
|
||||||
result['ui'] = profile.get_ui()
|
result['ui'] = profile.get_ui()
|
||||||
result['volumes'] = [v.json() for v in user.volumes.all()]
|
result['volumes'] = [v.json() for v in user.volumes.all()]
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Reference in a new issue