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

Open
#192 0 comments 0 reactions 0 assignees View on GitHub

@hasanravda is already working on this.

Since Mar 12, 2026.

  • #193 by @hasanravda — open

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

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

  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
  • 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/NeuroTrack

All issues in AOSSIE-Org/NeuroTrack

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.