fix: show all tiers in admin matrix editor including selfhosted
- Remove active=true filter - admins need to configure all tiers - Add reset_period to features query for frontend display Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
759d5e5162
commit
8bb5d85c16
|
|
@ -29,13 +29,13 @@ def get_tier_limits_matrix(session: dict = Depends(require_admin)):
|
||||||
with get_db() as conn:
|
with get_db() as conn:
|
||||||
cur = get_cursor(conn)
|
cur = get_cursor(conn)
|
||||||
|
|
||||||
# Get all tiers
|
# Get all tiers (including inactive - admin needs to configure all)
|
||||||
cur.execute("SELECT id, name, sort_order FROM tiers WHERE active = true ORDER BY sort_order")
|
cur.execute("SELECT id, name, sort_order FROM tiers ORDER BY sort_order")
|
||||||
tiers = [r2d(r) for r in cur.fetchall()]
|
tiers = [r2d(r) for r in cur.fetchall()]
|
||||||
|
|
||||||
# Get all features
|
# Get all features
|
||||||
cur.execute("""
|
cur.execute("""
|
||||||
SELECT id, name, category, limit_type, default_limit
|
SELECT id, name, category, limit_type, default_limit, reset_period
|
||||||
FROM features
|
FROM features
|
||||||
WHERE active = true
|
WHERE active = true
|
||||||
ORDER BY category, name
|
ORDER BY category, name
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user