From 495df6d70936709bf4709d6fad528a8f808a29e6 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 29 Jun 2018 13:24:54 +0200 Subject: [PATCH] Update User and Role so they have a proper __repr__ method --- app/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index 13c0ffd..46d5ce2 100644 --- a/app/models.py +++ b/app/models.py @@ -38,7 +38,7 @@ class User(db.Model, UserMixin): secondary=users_roles, backref=db.backref('users', lazy='dynamic')) - def __str__(self): + def __repr__(self): return f'' @@ -51,3 +51,6 @@ class Role(db.Model, RoleMixin): #: A description of the role description = db.Column(db.UnicodeText) + + def __repr__(self): + return f''