Add staging environment documentation and minor fixes
- Document staging vs production DB separation (autonet_staging) - Add staging sync and deployment commands to CLAUDE.md - Update changelog with 2025-01-03 changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ from pathlib import Path
|
||||
from lxml import etree
|
||||
from lxml import html as lxml_html
|
||||
from ..database import get_db
|
||||
from ..models import Car, CarMaker, CarModel, CarImage, CarOption, CarPerformanceCheck, CarSpecification, PerformanceCheckView, CarView, User
|
||||
from ..models import Car, CarMaker, CarModel, CarImage, CarOption, CarPerformanceCheck, CarSpecification, PerformanceCheckView, CarView, User, VehicleRequest, RequestVehicle
|
||||
from ..models.settings import SystemSettings
|
||||
from ..api.auth import get_current_user, get_current_user_optional, get_current_admin_user
|
||||
from ..services.cache_service import CacheService
|
||||
@@ -1712,7 +1712,14 @@ async def get_car_performance_check(
|
||||
CarView.car_id == car_id
|
||||
).first()
|
||||
|
||||
has_access = (existing_perf_view is not None) or (existing_car_view is not None)
|
||||
# Check 3: This car was recommended to the user (paid 1 CC for recommendation)
|
||||
recommended_vehicle = db.query(RequestVehicle).join(VehicleRequest).filter(
|
||||
VehicleRequest.user_id == current_user.id,
|
||||
RequestVehicle.car_id == car_id,
|
||||
RequestVehicle.is_approved == True
|
||||
).first()
|
||||
|
||||
has_access = (existing_perf_view is not None) or (existing_car_view is not None) or (recommended_vehicle is not None)
|
||||
|
||||
# If no access, return only basic info (that performance check exists)
|
||||
if not has_access:
|
||||
|
||||
Reference in New Issue
Block a user