Commit Graph

2 Commits

Author SHA1 Message Date
Claude
55214b1dc3 Fix NOT NULL constraint error for stripe_payment_intent_id
- Add stripe_payment_intent_id field to WalletTransaction model with proper defaults
- Update User.deduct_balance() to handle missing stripe_payment_intent_id gracefully
- Update User.add_balance() to handle missing stripe_payment_intent_id gracefully
- Use try-catch pattern to handle database schema mismatches
- Provide empty string as default for stripe_payment_intent_id when field is required

Issue: Database has NOT NULL constraint on stripe_payment_intent_id but code doesn't provide it
Solution: Add field with proper defaults and graceful error handling

Prevents: 'NOT NULL constraint failed: wallet_wallettransaction.stripe_payment_intent_id'
2025-07-16 23:01:31 +05:30
Claude
67ba2de335 first working 2025-07-09 02:15:35 +05:30