AOSSIE-Org / AOSSIE-Org/NeuroTrack

BUG: null email causes PostgreSQL NOT NULL violation during therapist registration

Đang mở
#192 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Dart
Star
29
Fork
50
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

## 📌 Issue Overview
When a new therapist completes the registration form (PersonalDetailsScreen), the app crashes with a Postgres exception because email and phone are NOT NULL in the therapist table but were never included in the storePersonalInfo insert payload.

## Root Cause
storePersonalInfo in SupabaseAuthRepository only spread personalInfoEntity.toMap() - which doesn't contain email or phone since those aren't fields in TherapistPersonalInfoEntity

## 🔍 Steps to Reproduce

1. Sign in with a Google account that has no existing therapist record
2. Fill in the registration form and tap Continue
3. App throws: PostgrestException: null value in column "email" violates not-null constraint

## 🎯 Expected Behavior
After completing the registration form and tapping Continue, the therapist's record is successfully inserted into the therapist table with their Google account email and provided phone number. The user is navigated to the Home screen.

## 🚨 Actual Behavior
Insert fails with Postgres Exception
PostgrestException: null value in column "email" of relation "therapist" violates not-null constraint

## 📷 Screenshot

Image

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.