- from app.models.fleet.vehicle → app.models.vehicle.vehicle (Vehicle)
- from app.models.fleet.organization → app.models.marketplace.organization (Branch)
These modules don't exist under app.models.fleet, causing
ModuleNotFoundError on GET /api/v1/admin/organizations/45/details
Root cause: Old code used rules.get('max_vehicles') which only searched
JSONB root level. Corporate tiers store limits under rules['allowances'].
Changes:
1. Added _extract_limit() helper (3-level search: direct → allowances → limits)
2. Replaced single-sub .limit(1) with multi-sub .all() for true aggregation
3. Fixed fallback path to use _extract_limit() instead of rules.get()
4. Added clamping: asset_limit = max(asset_limit, 1) right before
SubscriptionSummary creation on BOTH code paths
5. Added 'type' column to SubscriptionTier model (base vs addon)