05/07 Phase 3: fixed tenant's appoinment page error

This commit is contained in:
2026-05-07 15:48:24 -04:00
parent ce462c57b2
commit bac9f7ee2c
2 changed files with 28 additions and 17 deletions
+5 -1
View File
@@ -46,8 +46,12 @@ def index():
tenant_id=g.tenant.id, is_active=True).filter(
Service.deleted_at.is_(None)).order_by(Service.name).all()
prev_date = view_date - timedelta(days=1)
next_date = view_date + timedelta(days=1)
return render_template("tenant/appointments/index.html",
appointments=appts, view_date=view_date,
prev_date=prev_date, next_date=next_date,
staff_list=staff_list, services=services)
@@ -224,4 +228,4 @@ def _user_db_id():
uid_str = current_user.get_id()
return int(uid_str.split(":")[1]) if uid_str and ":" in uid_str else None
except Exception:
return None
return None