Added tenant information to the session...

This commit is contained in:
Josako
2024-04-29 13:18:34 +02:00
parent 17766aedbd
commit 1956b8a29b
5 changed files with 13 additions and 22 deletions

View File

@@ -0,0 +1,8 @@
from flask import session
from ..models.user import User, Tenant
# Definition of Trigger Handlers
def set_tenant_session_data(sender, user):
tenant = Tenant.query.filter_by(id=user.tenant_id).first()
session['tenant'] = tenant