BUG: null email causes PostgreSQL NOT NULL violation during therapist registration
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- dart, postgresql, supabase
- Domain
- authentication, database, mobile
Research direction
Start with SupabaseAuthRepository.storePersonalInfo, then inspect TherapistPersonalInfoEntity.toMap() and the PersonalDetailsScreen registration flow. Reproduce registration with a Google account lacking a therapist record; done means the therapist insert includes the Google email and provided phone and navigation reaches Home without a Postgres exception.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- 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
- Sign in with a Google account that has no existing therapist record
- Fill in the registration form and tap Continue
- 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
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
- Dominant language
- Dart
- Stars
- 30
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/NeuroTrack
-
fix(therapist): Method marked @override does not override any inherited methodPossibly taken @Muneerali199 claimed this 259 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AOSSIE-Org/NeuroTrack#198 ·
-
fix: Don't use BuildContext across async gaps (use_build_context_synchronously)Possibly taken @Muneerali199 claimed this 259 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AOSSIE-Org/NeuroTrack#197 ·
-
fix(patient): Remove unused and duplicate imports across patient appPossibly taken @Muneerali199 claimed this 259 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AOSSIE-Org/NeuroTrack#195 ·
-
BUG: Therapy details save button has no loading guard, allowing duplicate submissions that inflate patient regression reportsPossibly taken @Varadraj75 claimed this 222 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 68/100
AOSSIE-Org/NeuroTrack#221 ·
-
BUG: Appointment booking ignores selected time slot, every appointment saved at midnight to SupabasePossibly taken @Varadraj75 claimed this 227 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
AOSSIE-Org/NeuroTrack#219 ·
All issues in AOSSIE-Org/NeuroTrack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Anxcye/anx-reader#1024 ·
-
[cloud_functions]: Apple platforms ignore custom domains passed as regionPossibly taken @ragavendranbala-TSL claimed this today. OpenNeeds Attention platform: ios platform: macos plugin: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/flutterfire#19015 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RevenueCat/purchases-flutter#2048 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hajisensai/Fushi#4543 · 3 comments ·
Maintainers usually reply within 1 day
-
[video_player] _updatePosition sets isCompleted=true after 500ms when duration is Duration.zeroOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day