[System] Usermodel geändert

* firstname und lastname nun 50 Zeichen lang
* email 60 zeichen lang
This commit is contained in:
Tim Gröger 2020-11-12 19:30:18 +01:00
parent 130774e665
commit 0f64c718f5
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ def login_user(username, password):
def update_user(user):
current_app.config["FG_AUTH_BACKEND"].update_user(user)
if not user.display_name:
user.display_name = "{} {}".format(user.firstname, user.lastname)
user.display_name = "{} {}.".format(user.firstname, user.lastname[0])
db.session.commit()

View File

@ -47,9 +47,9 @@ class User(db.Model, ModelSerializeMixin):
__tablename__ = "user"
userid: str = db.Column(db.String(30), nullable=False)
display_name: str = db.Column(db.String(30))
firstname: str = db.Column(db.String(30))
lastname: str = db.Column(db.String(30))
mail: str = db.Column(db.String(30))
firstname: str = db.Column(db.String(50))
lastname: str = db.Column(db.String(50))
mail: str = db.Column(db.String(60))
roles: [str] = []
roles_: [Role] = db.relationship("Role", secondary=association_table, cascade="save-update, merge")