Skip to content
Snippets Groups Projects
Commit 4cbff93f authored by Jan Mach's avatar Jan Mach
Browse files

Removed unnecessary forced conversions from User model dict dump.

parent 0f279523
No related branches found
No related tags found
No related merge requests found
......@@ -242,18 +242,19 @@ class UserModel(MODEL):
*Interface implementation:* Implementation of :py:func:`mentat.datatype.sqldb.MODEL.to_dict` method.
"""
return {
'id': int(self.id),
'id': self.id,
'createtime': str(self.createtime),
'logintime': str(self.logintime),
'login': str(self.login),
'fullname': str(self.fullname),
'email': str(self.email),
'organization': str(self.organization),
'login': self.login,
'fullname': self.fullname,
'email': self.email,
'organization': self.organization,
'roles': [ str(x) for x in self.roles],
'apikey': str(self.apikey),
'apikey': self.apikey,
'password': self.password,
'enabled': bool(self.enabled),
'locale': str(self.locale),
'timezone': str(self.timezone),
'locale': self.locale,
'timezone': self.timezone,
'memberships': [(x.id, x.name) for x in self.memberships],
'memberships_wanted': [(x.id, x.name) for x in self.memberships_wanted],
'managements': [(x.id, x.name) for x in self.managements]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment