[elbe-devel] [PATCH 5/8] elbepack: db: remove get_user_data()
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Aug 13 13:31:53 CEST 2024
It is not used.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/db.py | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/elbepack/db.py b/elbepack/db.py
index 860565bbfb83..2b7bee798d64 100644
--- a/elbepack/db.py
+++ b/elbepack/db.py
@@ -770,15 +770,6 @@ class ElbeDB:
return str(u.name)
- def get_user_data(self, userid):
- with session_scope(self.session) as s:
- try:
- u = s.query(User).filter(User.id == userid).one()
- except NoResultFound:
- raise ElbeDBError(f'no user with id {userid}')
-
- return UserData(u)
-
def get_user_id(self, name):
with session_scope(self.session) as s:
try:
@@ -820,15 +811,6 @@ class User(Base):
projects = relationship('Project', backref='owner')
-class UserData:
- def __init__(self, user):
- self.id = int(user.id)
- self.name = str(user.name)
- self.fullname = str(user.fullname)
- self.email = str(user.email)
- self.admin = bool(user.admin)
-
-
class Project (Base):
__tablename__ = 'projects'
--
2.46.0
More information about the elbe-devel
mailing list