From c8eae0187833a198395955ef717c7154c6edef8f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 22 Mar 2017 18:00:12 +0100 Subject: [PATCH] Improve User str and repr --- database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index 28d2fc41..7a2efb99 100644 --- a/database.py +++ b/database.py @@ -27,7 +27,10 @@ class User(Base): telegram_id = Column(Integer, unique=True) def __str__(self): - return f"{self.id} - {self.username}" + return self.username + + def __repr__(self): + return f"" Base.metadata.create_all(engine)