Skip to content

hotfix: resolve tenant data leak, DB pool, and cent rounding - #227

Open
ramazanberkozbek wants to merge 10 commits into
Base360-AI:mainfrom
ramazanberkozbek:main
Open

ramazanberkozbek wants to merge 10 commits into
Base360-AI:mainfrom
ramazanberkozbek:main

Conversation

@ramazanberkozbek

Copy link
Copy Markdown
  • Fixed DatabasePool asyncpg configuration and removed the silent fallback to fake mock data ($1000). Real database errors now fail closed instead of hiding behind hardcoded numbers.
  • Fixed cross tenant data leak by scoping the Redis cache key with tenant ID (revenue:{tenant_id}:{property_id}). Tenants sharing property IDs like prop-001 no longer see each other's cached revenue.
  • Fixed cent rounding discrepancies by summing revenue with Python Decimal and ROUND_HALF_UP instead of float.
  • Accounted for property timezone (Europe/Paris) on check-in dates so Sunset's March total correctly includes the 29 Feb 23:30 UTC booking ($2250.00 across 4 bookings).
  • Removed the timestamp in RevenueSummary.tsx to let client side caching work properly.

Tested

Comment thread backend/app/services/reservations.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant